IDE hangs on startup: "Unable to get Documents Folder: Access is denied"

I downloaded arduino IDE on my windows.No problem arises while downloading and installing,that part goes smoothly,but after downloading,the IDE doesn't open,and it just sits there with the arduino logo on the screen,getting enlarged and minimized.I have tried downloading all possible versions for windows,but still same problem.Please help me!!:folded_hands::folded_hands:

Hey my friend have you tried to open Arduino IDE as admin ?

I moved your topic to an appropriate forum category @manasdhanpawde.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Hi @manasdhanpawde. I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. Close all Arduino IDE windows if the IDE is already running.
  2. Start Windows "File Explorer".
  3. Open the Arduino IDE installation folder.
    β“˜ The default installation location is at one of the following paths:
    • C:\Program Files\Arduino IDE
      
    • C:\Users\<username>\AppData\Local\Programs\Arduino IDE
      
      (where <username> is your Windows username)
      :exclamation: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  4. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
  5. From the context menu, click "Open PowerShell window here".
    Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  6. Type the following command:
    & ".\Arduino IDE"
    
  7. Press the Enter key.
    Debug output should now be printed to the PowerShell window as Arduino IDE starts.
  8. Wait until you are sure the IDE startup has gone into the hang state
    (as indicated by no additional output being printed to the terminal).
  9. Switch back to the PowerShell window if the Arduino IDE window took the focus.
  10. Press Ctrl+Shift+A.
    This will select all the text in the PowerShell window.
  11. Press Ctrl+C.
    This will copy the contents of the PowerShell window to the clipboard.
  12. Open a forum reply here by clicking the "Reply" button.
  13. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  14. Press Ctrl+V.
    This will paste the output into the code block.
  15. Move the cursor outside of the code block markup before you add any additional text to your reply.
  16. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

2 Likes

Thankyou sir!!

1 Like

I was also facing with this problem and I fixed it by restarting the computer and running the arduino ide in administrator mode.

perhaps you can try this?
@manasdhanpawde

regards
andy

1 Like

I am pasting all the output in the code block like u said,but still it is exceeding character limit of 120000 characters,that's why im not able to reply whole thing!!What should i do now??

In case the content is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to the post:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
    A dialog will open.
  6. In the dialog, select the .txt file you saved.
  7. Click the "Open" button.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

1 Like

at Readable.push (nodeinternalstrea.txt (638.0 KB)
I have attached the file you asked for.Thankyou!!

I see the relevant part of the logs here:

2023-11-12T07:27:38.574Z daemon ERROR Error: Unable to get Documents Folder: Access is denied.
    at Socket.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:46588)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
2023-11-12T07:27:38.574Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2023-11-12T07:27:38.599Z daemon INFO time="2023-11-12T12:57:38+05:30" level=warning msg="Unable to get Documents Folder: Access is denied."
2023-11-12T07:27:38.639Z daemon INFO time="2023-11-12T12:57:38+05:30" level=info msg="Using config file: c:\\Users\\Priyanka\\.arduinoIDE\\arduino-cli.yaml"

On startup, Arduino IDE queries Windows for the location of the user's "Documents" folder. For some reason, that innocuous query is failing with an "Access is denied" error on your system.

We have received other reports of IDE startup failures which have the symptom of an "Unable to get Documents Folder" error:

https://forum.arduino.cc/search?expanded=true&q=%22Unable%20to%20get%20Documents%20Folder%22

However, in all the other reports the reason was "The system cannot find the file specified." instead of "Access is denied" as in your logs. I didn't find any other reports of the exact "Unable to get Documents Folder: Access is denied." error you are getting so this is somewhat uncharted territory for me.

Can you think of anything unusual about your system that might cause Arduino IDE to not be able to access your "Documents" folder?

In the other reports, the users were usually using Microsoft "OneDrive" at one point. Windows moves your "Documents" folder from the normal location at c:\Users\Priyanka\Documents to something like c:\Users\Priyanka\OneDrive\Documents (where Documents might be localized), which is a location on the cloud rather than on your local hard drive. This can cause problems in the case where you are not connected to the OneDrive service, or if you later stopped using OneDrive but Windows still thinks your "Documents" folder is on OneDrive.

It is possible the problem might be caused by using alternative cloud storage services such as Dropbox.

yes,i used to use Microsoft onedrive some time back.What should i do now??How do i restore the folder to its original location on the hard drive??

You can try the following procedure to correct the configuration of the "Documents" folder:

  1. Start Windows "File Explorer".
  2. Right click on the "Documents" folder.
    A context menu will open.
  3. Select "Properties" from the context menu.
    The "Documents Properties" dialog will open.
  4. Select the "Location" tab in the "Documents Properties" dialog.
  5. Click the "Restore Default" button.
  6. Verify that the path shown in the field now has the following format:
    C:\Users\<username>\Documents
    
    (where <username> is your Windows username)
  7. Click the "OK" button.
2 Likes

Thanx a lot​:blush::blush:I solved the issues that were caused because of microsoft onedrive.It is working now.Thanku for your service​:pray::pray:

You are welcome. I'm glad it is working now.

Regards,
Per

A post was split to a new topic: IDE hangs on startup: "discovery builtin:serial-discovery not found"

A post was split to a new topic: IDE hangs on startup: "Error verifying signature: openpgp: signature expired"

A post was split to a new topic: IDE hangs on startup: "Error verifying signature: openpgp: signature expired"

A post was split to a new topic: IDE hangs on startup: "openpgp: signature expired"