holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

File Load Error for Untitled 2.ipynb #324

Open Stritheo opened 10 months ago

Stritheo commented 10 months ago

I've downloaded the iOS app twice and keep getting this error when I open the file. I've been online to watch a tutorial and this doesn't appear to be normal.

Can you please help?

Thanks

holzschu commented 10 months ago

First, thank you for reaching out. It's definitely not normal, but similar issues keep happening to random users, and I'd like to fix it. If you don't mind helping me, if have questions:

Stritheo commented 10 months ago

Hi

Thanks for the quick response. Here’s the answer to your Qs:

Miles Sowden (he/him)

0414185721 www.linkedin.com/in/milessowdenhttps://www.linkedin.com/in/milessowden

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Nicolas Holzschuch @.> Sent: Friday, January 19, 2024 8:28:32 AM To: holzschu/Carnets @.> Cc: Stritheo @.>; Author @.> Subject: Re: [holzschu/Carnets] File Load Error for Untitled 2.ipynb (Issue #324)

First, thank you for reaching out. It's definitely not normal, but similar issues keep happening to random users, and I'd like to fix it. If you don't mind helping me, if have questions:

— Reply to this email directly, view it on GitHubhttps://github.com/holzschu/Carnets/issues/324#issuecomment-1899230704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFOKLKY72ELPOOA73OTT7LLYPGHYBAVCNFSM6AAAAABCA5OWYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJZGIZTANZQGQ. You are receiving this because you authored the thread.Message ID: @.***>

holzschu commented 10 months ago

Thank you for the replies. I am still unsure about why it happens --- which is normal, it's a big issue that's been resisting for years, I don't think it'll be solved in a day.

The only thing that is certain is that it happens on what appears in the file browser as "iCloud/Carnets". I assume that if you navigate to "On my iPad/Carnets", then try to create a file, then it works, right?

I'm going to upload a TestFlight version of Carnets that displays more information when Carnets fails to write on its own iCloud folder (it's not solving the issue, it's just telling more about what is happening). It usually takes a few days for a new TestFlight version to be active, I'll let you know as soon as it is.

One last thing: github has removed your screenshot from the e-mail message (it's kind of annoying for that). Could you navigate to https://github.com/holzschu/Carnets/issues/324 and add it by hand?

Stritheo commented 10 months ago

What you suggested works. The only difference was it had defaulted to my iOS so by changing it to my iCloud it started without the error.

Is it safe to have Carnets running from my iCloud? It didn’t ask for any permission so I assume access is restricted. Are you able to share any details on this?

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Nicolas Holzschuch @.> Sent: Friday, January 19, 2024 7:46:24 PM To: holzschu/Carnets @.> Cc: Stritheo @.>; Author @.> Subject: Re: [holzschu/Carnets] File Load Error for Untitled 2.ipynb (Issue #324)

Thank you for the replies. I am still unsure about why it happens --- which is normal, it's a big issue that's been resisting for years, I don't think it'll be solved in a day.

The only thing that is certain is that it happens on what appears in the file browser as "iCloud/Carnets". I assume that if you navigate to "On my iPad/Carnets", then try to create a file, then it works, right?

I'm going to upload a TestFlight version of Carnets that displays more information when Carnets fails to write on its own iCloud folder (it's not solving the issue, it's just telling more about what is happening). It usually takes a few days for a new TestFlight version to be active, I'll let you know as soon as it is.

One last thing: github has removed your screenshot from the e-mail message (it's kind of annoying for that). Could you navigate to #324https://github.com/holzschu/Carnets/issues/324 and add it by hand?

— Reply to this email directly, view it on GitHubhttps://github.com/holzschu/Carnets/issues/324#issuecomment-1899992068, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFOKLK3C3BN6E5FF5IJSIQLYPIXGBAVCNFSM6AAAAABCA5OWYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJZHE4TEMBWHA. You are receiving this because you authored the thread.Message ID: @.***>

holzschu commented 10 months ago

I don't fully understand your questions. But I can tell you that Carnets has (should have) full access to two directories: "On my iPad/Carnets" and "iCloud Drive/Carnets". Both "belong to" Carnets, so it can do everything in these: open files, create files, create new files... For the other directories, you need to grant permission, either on a file-by-file basis (clicking on a file in the navigator grants permission) or by directory (clicking on the "unlock folder" icon).

To go back to your original question: I actually found some things to change in the code. It could be fixed. The test version is here: https://testflight.apple.com/join/UbNIjkjp

(It's the experimental version of Carnets-with-Scipy, to test things such as bug fixes before I put them on the AppStore. If you've never done this: click on the link on your iPad, it will ask you to install the TestFlight app, do it, then install Carnets-with-Scipy using the TestFlight app). Please tell me how this new version behaves, especially for "iCloud Drive/Carnets".

holzschu commented 10 months ago

@Stritheo did you have the time to check the experimental version? Does it improve access to iCloud?

Stritheo commented 10 months ago

Hi, it didn’t work. I got the same errors. I’m going to switch back to Colab for the next few weeks but will keep both Carnet apps to try again in two weeks

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Nicolas Holzschuch @.> Sent: Thursday, January 25, 2024 7:50:31 AM To: holzschu/Carnets @.> Cc: Stritheo @.>; Mention @.> Subject: Re: [holzschu/Carnets] File Load Error for Untitled 2.ipynb (Issue #324)

@Stritheohttps://github.com/Stritheo did you have the time to check the experimental version? Does it improve access to iCloud?

— Reply to this email directly, view it on GitHubhttps://github.com/holzschu/Carnets/issues/324#issuecomment-1908893646, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFOKLK7YZY3ZG6JDGZOMJGLYQFXZPAVCNFSM6AAAAABCA5OWYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYHA4TGNRUGY. You are receiving this because you were mentioned.Message ID: @.***>

holzschu commented 10 months ago

Thanks for the report. I find that very odd: you should have seen different errors, with more information about why it cannot access the files. I guess that's a clue, I'll look into it again.

andrewcrook commented 9 months ago

I just downloaded from App Store and have same issue on iPadOS 17.3.1

  1. when I start it shows the file interface
  2. I click “create new document” icon
  3. I then get the following error...

IMG_2781

holzschu commented 9 months ago

Thanks for the report. From what I can see, between your report and the code:

I suspect the issue is connected with iCloud in a way that I don't understand. I believe that if you navigate to "On my iPad", then "Carnets", then you should be able to create a new notebook there. You also have the option to change the notebook distribution to "nbclassic" instead of "notebook", using the Settings app, but I don't think it will change anything, except maybe the error message.

Thanks again for the report and the screenshot. I still have no idea what is happening or how to fix it, and I'm unable to reproduce it on any of my machines, but I have a slightly clearer idea of where it is happening.

andrewcrook commented 9 months ago

Its iCloud for sure

https://stackoverflow.com/questions/25827368/swift-webview-how-to-call-correctly-swift-code-from-javascript

https://developer.apple.com/documentation/cloudkitjs

holzschu commented 9 months ago

Thank you for the details. So yes, it is specific about iCloud. I don't think it is connected to JavaScript specifically, since it works on many machines (but not yours).

Just checking two points:

andrewcrook commented 9 months ago

is your iPad using "Lockdown mode”?

No it is off

if you open the Settings app, you'll see your Apple ID at the top. If you click on it, then "iCloud", then "iCloud drive", you'll see "Apps syncing to iCloud drive".

yes it is enabled for Carnets

I do actually have other JavaScript based apps working such as Obsidian. All my software on Apple devices are on the latest versions apart from my iPhone hence I don't have "Advanced Data Protection" enabled yet.

holzschu commented 9 months ago

Thank you again for all the information you provide. I have re-read Apple developer documentation, and the only thing I got was that this issue should not happen, and therefore is not documented.

I'm going back to your previous message: "If I try or open in other folders in iCloud Drive it cannot open the files". My understanding is that, even if you've copied a notebook from another place onto your iCloud Drive, and then clicked to open it, you get the "does not exist" error. Am I correct in this interpretation? Is is "does not exist", or another error message? (even the smaller clues can help).

I have another question: if you open the Settings app, and scroll down to "Carnets", there is an option titled "Document Storage". What does it say for you?

holzschu commented 8 months ago

Hi again, I think I've managed to fix this issue. The fix is available on the TestFlight version, if you want to try: https://testflight.apple.com/join/yevwlUs1