6 Replies Latest reply on Jun 4, 2020 9:04 PM by DheerajK_81

    UnauthorizedAccessException error from PSoC Creator 4.3


      Out of the blue, my Creator software (including 4.2 and 4.3) can no longer build because it seems not to have the proper permissions.  I'm seeing things like:


      --------------- Rebuild Started: 05/31/2020 19:23:01 Project: LED_Driver, Configuration: ARM GCC 5.4-2016-q2-update Debug ---------------

      Build process unable to delete contents of code gen dir.  Error: Failed to delete D:Firmware\LED_Driver\LED_Driver\LED_Driver.cydsn\codegentemp\bitstream.txt: Access to the path 'D:\Firmware\LED_Driver\LED_Driver\LED_Driver.cydsn\codegentemp\bitstream.txt' is denied.

      --------------- Rebuild Failed: 05/31/2020 19:23:01 ---------------


      I'm also seeing an error for "UnauthorizedAccessException" as shown in the attached screen shot.


      I suspect this is a Windows problem more than a Creator problem, per se.  But I've done everything I could think of to give the software the permissions it seems to have needed, and I've gotten nowhere with that.  I've even done a full uninstall/reinstall of Creator 4.3 (and completely removed my old Creator 4.2, which I'm not using anymore), and I have the same problem.  In fact, I've replaced the physical hardware for my "D:" disk drive (where I store data), since it was due for it and was starting to sputter in other ways.  But reloading a few known-good workspaces off the backup server and running them on the new "D:" drive produced the same problem.  And these all worked before.


      Any suggestions where to go with this would be helpful.  If I move these files over to my "C:" (system) drive, everything cleans correctly and builds correctly, so I do suspect it is a permissions issue of some kind.  I just don't know where it's buried.

        • 1. Re: UnauthorizedAccessException error from PSoC Creator 4.3

          Right-click on the project folder and go to the Security tab. You should see the User accounts on your system and the respective permissions for each of them.


          Select the User account you are using currently and check if all the permissions are set to "Allow".



          • 2. Re: UnauthorizedAccessException error from PSoC Creator 4.3

            What you're suggesting is actually the very first thing that I did.  And it hasn't helped.


            Just to be sure, I went back in and checked, but all permissions were set as shown.  (Full access was inherited from the folder settings above.)  Because this machine is only used by me and is behind a very secure firewall, pretty much every account on it (and there's really one one -- mine, with administrator priviledges) has full control.



            Something else seems to be going on here.Directory Properties.jpg

            • 3. Re: UnauthorizedAccessException error from PSoC Creator 4.3

              Can you try the following steps:


              (1) Right-click on the project folder > Properties > Security > Edit > Add > Advanced.

              (2) Type in "NETWORK" in the Name field under Common Queries tab and then click "Find Now" as shown:


              (3) Select "NETWORK SERVICE" and click OK > OK.

              (4) Then Select "NETWORK SERVICE" and provide all the permissions by setting everything to Allow.

              (5) Then click Apply.


              Run clean and build on the project. It should work successfully.


              Let me know your observations



              1 of 1 people found this helpful
              • 4. Re: UnauthorizedAccessException error from PSoC Creator 4.3

                Well, this is undeniably strange...


                What you suggested was among the things I did, and I went back into security settings for the folder "D:\Focus Embedded" under which all active projects reside.  What I found was that I wasn't imaging things...  I had set all NETWORK SERVICE permissions to "Allow."  And it didn't work.  But today I re-launched Creator 4.3 just to give it one more try -- and without changing anything from several days ago when I set the permissions as you suggested -- and two projects under that directory that had been having problems both built correctly.


                Why your suggestion didn't work three days ago and just did is something of a mystery.  And why things would have stopped working at any point (since Creator 4.3 was doing just fine until a few weeks ago) is also a mystery.  All I can think is that since when I tried this before and when I tried this today the PC in question has been cold-booted once or twice, so the OS had to go back through a lot of things on startup.t'


                It's working now...  But it's a queasy feeling when you can't quite say 100% why it stopped and then why it only just restarted.


                Then again, I'm working with another board with a USB2.0 hub and a few USB->Serial bridge chips of yours on it, and the first time I plugged it into this machine, Windows took the better part of 20 minutes to find all the drivers and turn all the bridge chips below the hub on all the way.


                Welcome to Microsoft...

                Creator Permissions.jpg

                • 5. Re: UnauthorizedAccessException error from PSoC Creator 4.3

                  The plot thickens...


                  The problem resurfaced, and I checked that permissions were all set correctly (and they were).


                  So I rebooted the machine, and things started working correctly under Creator again.

                  I believe Windows has a problem that it seems to forget the permissions set on the drive, but going through a reboot will remind it.


                  Yay, Microsoft!

                  • 6. Re: UnauthorizedAccessException error from PSoC Creator 4.3

                    This is indeed strange. But I'm glad there is a workaround even though it is not so convenient. I have Windows 10 v1703 b15063 running and everything works fine for me. Not sure which Windows version you are using, but probably, a Windows update could solve your issue?