Catalina and SpecialFolder.Temporary

  1. last week

    Michel B

    Oct 8 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited last week

    I start a new thread so we can address that particular issue.

    I just confirmed under Catalina, one of my apps is broken since SpecialFolder.Temporary reports isWritable as false for a sandboxed app.

    I am in the process of refactoring to use instead a Temp subfolder of ApplicationData.

  2. Rick A

    Oct 8 Pre-Release Testers (Brazil. GMT-3:00)

    Wouldn't it be a Xojo Bug needing a fix? In another thread Sam said something related to Xojo possibly needing an API upgrade in this part.

    @Beatrix Willius I did a simple test with

    dim f as FolderItem = SpecialFolder.Temporary
    f = GetTemporaryFolderItem

    and both give back nil.

    @Stéphane Mons SpecialFolder.Temporary and GetTemporaryFolderItem are still using Carbon calls, I guess, and they require a TemporaryItems folder to be created within $TMPDIR.

    Maybe Catalina no longer supports it or Carbon calls are trying to use FSRef.

    @Sam Rowlands I see it that there are multiple points of failure here... http://forum.xojo.com/conversation/post/442752

  3. Beatrix W

    Oct 8 Pre-Release Testers, Third Party Store Europe (Germany)
    Edited last week

    Xojo fixed the problem.

    The problem was and is that the specialfolder stuff works until it doesn't. I had one user last week doing a test where specialfolder.applications was not there in one execution of the test and there the next.

  4. Michel B

    Oct 8 Pre-Release Testers, Xojo Pro RubberViews.com

    Right now I replaced SpecialFolder.Temporary with a temp folder within Specialfolder.ApplicationData/com.matchsoftware.myapp

    BTW, Beatrix, Specialfolder.ApplicationData is not broken.

  5. Sam R

    Oct 8 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    @Michel B BTW, Beatrix, Specialfolder.ApplicationData is not broken.

    Don't jinx it!

  6. Beatrix W

    Oct 8 Pre-Release Testers, Third Party Store Europe (Germany)

    Hahahahahha..... thanks, Sam, for making me laugh. It's great the specialfolder.ApplicationData works. But that doesn't help for the broken Specialfolder.applications. And if Michel uses a Mutex then he is out of luck anyways.

  7. Michel B

    Oct 9 Pre-Release Testers, Xojo Pro RubberViews.com

    I don't use Mutex on Mac. The system prevents launching a new copy of the same software anyway.

    My problem is I need a Temp folder as a scratchpad.

    Of course, it would be a lot better if there was no bug in Specialfolder under Catalina. Hopefully Xojo is working on that.

  8. Emile S

    Oct 9 Europe (France, Strasbourg)
    Edited last week

    @Michel B The system prevents launching a new copy of the same software anyway.

    Copy YOUR application and run the two of them…

    Unless, Catalina refuse to make application(s) copie(s)…

  9. Michel B

    Oct 9 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited last week

    @Emile S Copy YOUR application and run the two of them…

    Unless, Catalina refuse to make application(s) copie(s)…

    There will always be ways for users to fück up. They probably also neglect to change tires on their car, and set their house on fire with hazardous electricity wiring. Pity. I am not shedding a tear for loonies.

  10. Emile S

    Oct 9 Europe (France, Strasbourg)

    Michel,

    I ust recall that Firefox reject the load of a second Firefox application with a message.

    This can happens when the application already run and you drop a document on the Dock icon (and that icon points to a different application).
    This can happens when you have an external hard disk. It can be pure hazard (not done to annoy the application creator).

  11. Kevin G

    Oct 9 Pre-Release Testers, Xojo Pro Gatesheed, England

    @Beatrix W Hahahahahha..... thanks, Sam, for making me laugh. It's great the specialfolder.ApplicationData works. But that doesn't help for the broken Specialfolder.applications. And if Michel uses a Mutex then he is out of luck anyways.

    Mutexes appear to be working okay for us.

    From the problems we are seeing it looks like Apple have further broken FSRef based APIs in macOS 10.15. As soon as you start putting files into the temporary folder weird stuff happens.
    • Another application cannot access your temporary files if it has a different bundle ID.
    • If you copy a file into the temporary folder and it has extended attributes applied you cannot access it properly.

  12. Michel B

    Oct 9 Pre-Release Testers, Xojo Pro RubberViews.com

    This code

    system.DebugLog SpecialFolder.Temporary.ShellPath
    
    dim s as new shell
    s.execute("echo $TMPDIR")
    system.debuglog s.Result

    Produces :

                          /var/folders/tt/tcp7xlks3xn3zpr6zlbzy4jm0000gn/T
                          /var/folders/tt/tcp7xlks3xn3zpr6zlbzy4jm0000gn/T/

    In other words, Xojo indeed points to the proper folder. So it is indeed Catalina not behaving like previous macOS which allowed access to the temporary folder.

    For some reason, Catalina prevents Xojo apps to access the temporary folder.

    I opened the temporary folder from the command line with

    Open $TMPDIR

    And dropped a file in there. No error. So it would seem the user can access that folder, but not a program.

    The plot thickens...

  13. Kevin G

    Oct 9 Pre-Release Testers, Xojo Pro Gatesheed, England

    @Michel B ....
    No error. So it would seem the user can access that folder, but not a program.

    The plot thickens...

    For us, access isn't 100% broken as our application can perform basic file IO actions to the temporary folder.
    The tests we performed during the Catalina beta seems to indicate a strange integration between FSRef based APIs and the temporary folder. Some (maybe all) of these issues disappear when you use newer file system APIs (ie: built using Xojo 2019r2).
    We currently have 3 open cases with Apple going back to August with two of them not receiving a response so I am not very hopeful that this will be addressed.

    What makes this worse is that Xojo left it to the very last minute to update the macOS APIs being used for FolderItem and rolling that muchly needed improvement into the same release as a major change (v2 API) making it difficult for users to respond quickly.

  14. Michel B

    Oct 9 Pre-Release Testers, Xojo Pro RubberViews.com

    Apparently, indeed, 2019R2 just released seems to be able to access temporary under Catalina.

  15. Kevin G

    Oct 9 Pre-Release Testers, Xojo Pro Gatesheed, England

    @Michel B Apparently, indeed, 2019R2 just released seems to be able to access temporary under Catalina.

    Just to be clear, what I wrote above applies to our application compiled with Xojo 2017r3 so access isn't completely broken if you aren't using Xojo 2019r2.

or Sign Up to reply!