SyncServerII / Neebla

Private and Self-Owned Social Media
MIT License
1 stars 2 forks source link

Starting downloads and using the sharing extension gives errors #4

Open crspybits opened 3 years ago

crspybits commented 3 years ago

I see error messages (alerts). This is what I see in the logs: 2021-02-11 22:46:33.875 [Error] [main] [ServerInterface.swift:103] userEvent(_:event:) > Optional(iOSBasics.SyncServerError.internalError("Could not get ObjectDownloadHandler for DownloadObjectTracker"))

I wonder if what is going on is that (a) the background URLSession is being setup in the sharing extension, but (b) the rest of the needed setup is not happening. If that is true, then could I deal with this by not setting up the background URL session while the sharing extension is active? Hmmm. That doesn’t seem possible given the way things are organized right now. The background URL session is needed to queue up new uploads. try AnyTypeManager.session.setup() is currently called in LocalServices. And AnyTypeManager does the setup needed for the ObjectDownloadHandler’s. See also https://stackoverflow.com/questions/66189620/ios-sharing-extensions-background-urlsessions