Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
My new shortcut uploads my existing shortcuts to the Cloud.

Inadvertently I had disconnected from my WiFi connection.

When I ran my shortcut (without WiFi) it ran successfully, yet when I went to check my uploaded files (in the Files app) it indicated that I had an “Upload Error”.

After debugging the problem, I reconnected to WiFi, ran the shortcut again, and the upload was successful.

After all of this, is it possible to detect serious errors while my shortcut is running, so that I could apply an appropriate error handling routine?

Thanks,
Frank M
 

Jessica Lares

macrumors G3
Oct 31, 2009
9,612
1,057
Near Dallas, Texas, USA
You can try getting the file afterwards with Get File. It already has a toggle for showing an error and stopping the shortcut, turn that off and add an If.

Make sure you add a ".zip" to the end of the file path, otherwise it won't find the file.

This is on iOS 13, should still work similar on 12 if you're still on it.

New Shortcut 3.png
 

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
You can try getting the file afterwards with Get File. It already has a toggle for showing an error and stopping the shortcut, turn that off and add an If.

Make sure you add a ".zip" to the end of the file path, otherwise it won't find the file.

This is on iOS 13, should still work similar on 12 if you're still on it.

View attachment 866196
Using iOS 13.

Thanks for your response, I’ll give it a try.
You can try getting the file afterwards with Get File. It already has a toggle for showing an error and stopping the shortcut, turn that off and add an If.

Make sure you add a ".zip" to the end of the file path, otherwise it won't find the file.

This is on iOS 13, should still work similar on 12 if you're still on it.

View attachment 866196
Jessica,

Using iOS 13.

Tried your suggestion using the Get File action/If statement (with WiFi off), but it did not work properly.
If NO file exists your routine works fine, however in my situation the shortcut ran and the new file was created anyway.
The Find app shows the new file with “Upload Error” indicated.

See attached.

Thanks again,
Frank M
 

Attachments

  • 42F66683-3460-4C9D-A781-1405D9FF56CE.jpeg
    42F66683-3460-4C9D-A781-1405D9FF56CE.jpeg
    383.5 KB · Views: 87

Jessica Lares

macrumors G3
Oct 31, 2009
9,612
1,057
Near Dallas, Texas, USA
Alright. I was able to recreate your problem. The way iCloud works is that files are still saved locally and just waiting for wifi to be toggled to upload in the background. You can check that it's connected with Get Network Details and get the network's name and do an If with that.

By the way, I couldn't get set wi-fi to toggle it on. I looked around and other people have the same issue. It's a built-in app now so that's something that will probably be addressed in the next iOS update.
 

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
Thanks for your interest in my post. I understand what you outlined.
Will try the Get Network Details action as you suggested.

Thanks again.
Frank M
 

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
Jessica,

I just tried the Get Network Details action/If statement you had suggested and it worked as expected.

Since solutions to some of my shortcut issues are hard to come by, I’m glad for people like yourself (and this forum) that I can get answers to my questions as I try to become more proficient in developing new shortcuts.

Thanks again, your interest in this matter was greatly appreciated.

Frank M
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.