Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IDE hangs on startup in macOS GUI mode #1527

Open
3 tasks done
erongd opened this issue Oct 5, 2022 · 9 comments
Open
3 tasks done

IDE hangs on startup in macOS GUI mode #1527

erongd opened this issue Oct 5, 2022 · 9 comments
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@erongd
Copy link

erongd commented Oct 5, 2022

Describe the problem

I have installed the Arduino IDE 2.0 on MacOS Monterey (12.6). It is a late-2019 16" macbook pro. When start the IDE in UI mode through spotlight or application folder, the IDE hangs. No splash screen, only the icon jumping in the dock eventually stuck with "Application not responding". However when I start the IDE in command line mode through terminal, the IDE starts just fine. Due to hang state I could not get any logs. It is very strange behavior.

I start to experience the issue in rc-9, thought it is due to beta. But seems the 2.0 GA version has the same problem. Once the IDE starts from the command line everything seems to work just fine.

To reproduce

Don't know what would be needed to reproduce it.

Expected behavior

Arduino IDE should start normally with splash screen then the actual IDE open on desktop.

Arduino IDE version

2.0.1-nightly-20221004

Operating system

macOS

Operating system version

12.6

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@erongd erongd added the type: imperfection Perceived defect in any part of project label Oct 5, 2022
@per1234 per1234 self-assigned this Oct 5, 2022
@CptHolzschnauz
Copy link

Can't confirm. I installed it on a 2013 MacPro, on a iMac27 and on a M1 Air (All 12.6) without any problems or the issue you described here.

@per1234
Copy link
Contributor

per1234 commented Oct 5, 2022

Hi @erongd. Thanks for you report.

The IDE automatically writes log files while it is running. I think these logs might contain some information that will allow us to identify the problem so I'm going to ask you to provide the log file from your computer.

Please do this:

  1. Attempt to start the Arduino IDE "in UI mode", as you did before.
  2. Wait some time to be sure the application is in the hung state.
  3. Open the issue page here on GitHub:
    IDE hangs on startup in macOS GUI mode #1527 (comment)
  4. Click the "Attach files by dragging & dropping, selecting or pasting them" at the bottom of the "Leave a comment" field.
  5. Select the latest .log file from this folder (the files are named according to the date):
    ~/Library/Logs/Arduino IDE/
    
  6. Click the Open button to attach the file to the comment.
  7. You will now see an "Uploading your files... (1/1)" status indicator at the bottom of the "Leave a comment" field. Wait until that disappears.
  8. Click the Comment button to publish the comment.

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

@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Oct 5, 2022
@erongd
Copy link
Author

erongd commented Oct 6, 2022

Unfortunately start from UI mode does not produce any log before it hung.

@per1234 per1234 removed the status: waiting for information More information must be provided before work can proceed label Oct 11, 2022
@Arcanum-XIII
Copy link

Arcanum-XIII commented Oct 24, 2022

On my Mac, (Monterey 12.5.1, Air M1), I got:

root ERROR Failed to start the backend application:
root ERROR Error: listen EADDRNOTAVAIL: address not available 127.0.0.1
    at Server.setupListenHandle [as _listen2] (node:net:1298:21)
    at listenInCluster (node:net:1363:12)
    at GetAddrInfoReqWrap.doListen [as callback] (node:net:1501:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
root ERROR Uncaught Exception:
root ERROR Error: listen EADDRNOTAVAIL: address not available 127.0.0.1
    at Server.setupListenHandle [as _listen2] (node:net:1298:21)
    at listenInCluster (node:net:1363:12)
    at GetAddrInfoReqWrap.doListen [as callback] (node:net:1501:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)

Then some error regarding missing plugins in my localUser .arduinoIDE config. It's currently empty so...

But I guess the Backend without connection would explain most of the issue.

@Arcanum-XIII
Copy link

After updating to 12.6, it seems the network stack is working better and it allowed me to get the IDE working.

I've checked with arduino-cli daemon and it couldn't bind to 50051 (even though nothing used the socket). So on my end, more than probably linked to something rotten on the system network stack.

@dave0mi

This comment has been minimized.

@dave0mi

This comment has been minimized.

@kittaakos

This comment has been minimized.

@per1234 per1234 changed the title Arduino IDE 2.0 hangs on startup in GUI mode - MacOS Monterey. IDE hangs on startup in macOS GUI mode Sep 26, 2023
@stefannilsson
Copy link

Had the same issues on Apple M1, Sequoia 15.0.1 (24A348):

Arduino IDE 2.3.5-nightly-20241212
Checking for frontend application configuration customizations. Module path: /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/electron-main.js, destination 'package.json': /Applications/Arduino IDE.app/Contents/Resources/app/package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.5-nightly-20241212" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "1.1.1" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-12-12T03:23:28.481Z" (type of string)
Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{}},"defaultLocale":"","validatePreferencesSchema":false,"preferences":{"window.title":"${rootName}${activeEditorShort}${appName}","files.autoSave":"afterDelay","editor.minimap.enabled":false,"editor.tabSize":2,"editor.scrollBeyondLastLine":false,"editor.quickSuggestions":{"other":false,"comments":false,"strings":false},"editor.maxTokenizationLineLength":500,"editor.bracketPairColorization.enabled":false,"breadcrumbs.enabled":false,"workbench.tree.renderIndentGuides":"none","explorer.compactFolders":false},"appVersion":"2.3.5-nightly-20241212","cliVersion":"1.1.1","buildDate":"2024-12-12T03:23:28.481Z"}
Starting backend process. PID: 6828
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///Users/user1/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2025-01-03T17:17:07.686Z root INFO Backend Object.initialize: 39.7 ms [Finished 1.129 s after backend start]
2025-01-03T17:17:07.702Z root INFO Backend Object.configure: 27.2 ms [Finished 1.130 s after backend start]
2025-01-03T17:17:07.702Z root INFO Backend s.onStart: 12.2 ms [Finished 1.130 s after backend start]
2025-01-03T17:17:07.711Z root INFO Backend s.configure: 15.9 ms [Finished 1.210 s after backend start]
2025-01-03T17:17:07.729Z root INFO Backend d.onStart: 5.4 ms [Finished 1.210 s after backend start]
2025-01-03T17:17:07.732Z root INFO Backend d.configure: 3.4 ms [Finished 1.214 s after backend start]
2025-01-03T17:17:07.746Z root WARN Backend d.initialize took longer than the expected maximum 50 milliseconds: 84.8 ms [Finished 1.221 s after backend start]
2025-01-03T17:17:07.756Z root INFO Backend c.onStart: 7.5 ms [Finished 1.221 s after backend start]
2025-01-03T17:17:07.763Z root INFO Backend a.configure: 19.4 ms [Finished 1.241 s after backend start]
2025-01-03T17:17:07.767Z config INFO >>> Initializing CLI configuration...
2025-01-03T17:17:07.769Z root INFO Backend c.initialize: 6.8 ms [Finished 1.248 s after backend start]
2025-01-03T17:17:07.770Z root INFO Backend x.onStart: 17.1 ms [Finished 1.261 s after backend start]
2025-01-03T17:17:07.776Z config INFO Loading CLI configuration from /Users/user1/.arduinoIDE/arduino-cli.yaml...
2025-01-03T17:17:07.780Z daemon INFO Starting daemon from /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-cli...
2025-01-03T17:17:07.780Z root INFO Backend a.initialize: 0.4 ms [Finished 1.269 s after backend start]
2025-01-03T17:17:07.780Z root INFO Backend w.onStart: 14.2 ms [Finished 1.282 s after backend start]
2025-01-03T17:17:07.780Z root INFO Backend r.configure: 28.4 ms [Finished 1.292 s after backend start]
2025-01-03T17:17:07.781Z discovery-log INFO start
2025-01-03T17:17:07.781Z discovery-log INFO start new deferred
2025-01-03T17:17:07.781Z root INFO Backend d.initialize: 6.3 ms [Finished 1.300 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend y.onStart: 10.7 ms [Finished 1.305 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend r.configure: 5.8 ms [Finished 1.306 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend a.onStart: 3.6 ms [Finished 1.317 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend h.configure: 3.0 ms [Finished 1.317 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend s.configure: 0.5 ms [Finished 1.317 s after backend start]
2025-01-03T17:17:07.781Z root INFO Backend l.configure: 0.1 ms [Finished 1.317 s after backend start]
2025-01-03T17:17:07.809Z root INFO Theia app listening on http://127.0.0.1:49314.
2025-01-03T17:17:07.810Z root INFO Finished starting backend application: 27.5 ms [Finished 1.344 s after backend start]
2025-01-03T17:17:07.869Z root WARN The local plugin referenced by local-dir:/Users/user1/.arduinoIDE/plugins does not exist.
2025-01-03T17:17:07.869Z root WARN The local plugin referenced by local-dir:/Users/user1/.arduinoIDE/extensions does not exist.
2025-01-03T17:17:08.169Z daemon INFO time="2025-01-03T18:17:07+01:00" level=info msg="arduino-cli version 1.1.1"
time="2025-01-03T18:17:07+01:00" level=info msg="Using config file: /Users/user1/.arduinoIDE/arduino-cli.yaml"
time="2025-01-03T18:17:07+01:00" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:49315
{"IP":"127.0.0.1","Port":"49315"}
2025-01-03T17:17:08.169Z daemon INFO Daemon is running.
2025-01-03T17:17:08.186Z config INFO Loading CLI configuration from /Users/user1/.arduinoIDE/arduino-cli.yaml...
2025-01-03T17:17:08.756Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":[]}}
2025-01-03T17:17:08.756Z config INFO Loading fallback CLI configuration to get 'directories.data' and 'directories.user'
2025-01-03T17:17:09.006Z config INFO Loaded fallback CLI configuration: {"directories":{"user":"/Users/user1/Documents/Arduino","data":"/Users/user1/Library/Arduino15"}}
2025-01-03T17:17:09.006Z config INFO Merged CLI configuration with the fallback: {"directories":{"user":"/Users/user1/Documents/Arduino","data":"/Users/user1/Library/Arduino15"},"board_manager":{"additional_urls":[]}}
2025-01-03T17:17:09.006Z config INFO Loaded the CLI configuration.
2025-01-03T17:17:09.063Z daemon INFO time="2025-01-03T18:17:08+01:00" level=info msg="Checking signature" index=/Users/user1/Library/Arduino15/package_index.json signatureFile=/Users/user1/Library/Arduino15/package_index.json.sig trusted=true
time="2025-01-03T18:17:08+01:00" level=info msg="Loading hardware from: /Users/user1/Library/Arduino15/packages"
time="2025-01-03T18:17:09+01:00" level=info msg="Loading package builtin from: /Users/user1/Library/Arduino15/packages/builtin"
time="2025-01-03T18:17:09+01:00" level=info msg="Checking existence of 'tools' path: /Users/user1/Library/Arduino15/packages/builtin/tools"
time="2025-01-03T18:17:09+01:00" level=info msg="Loading tools from dir: /Users/user1/Library/Arduino15/packages/builtin/tools"
time="2025-01-03T18:17:09+01:00" level=info msg="Loaded tool" tool="builtin:ctags@5.8-arduino11"
time="2025-01-03T18:17:09+01:00" level=info msg="Loaded tool" tool="builtin:dfu-discovery@0.1.2"
time="2025-01-03T18:17:09+01:00" level=info msg="Loaded tool" tool="builtin:mdns-discovery@1.0.9"
time="2025-01-03T18:17:09+01:00" level=info msg="Loaded tool" tool="builtin:serial-discovery@1.4.1"
time="2025-01-03T18:17:09+01:00" level=info msg="Loaded tool" tool="builtin:serial-monitor@0.14.1"
time="2025-01-03T18:17:09+01:00" level=info msg="Loading libraries index file" index=/Users/user1/Library/Arduino15/library_index.json
2025-01-03T17:17:09.065Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///Users/user1/Library/Arduino15","sketchDirUri":"file:///Users/user1/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
2025-01-03T17:17:09.065Z config INFO Validating the CLI configuration...
2025-01-03T17:17:09.105Z config INFO The CLI config is valid.
2025-01-03T17:17:09.105Z config INFO <<< Initialized the CLI configuration.
2025-01-03T17:17:09.111Z root INFO Resolve plugins list: 1340.9 ms [Finished 2.647 s after backend start]
2025-01-03T17:17:09.280Z daemon INFO time="2025-01-03T18:17:09+01:00" level=info msg="Adding libraries dir" dir=/Users/user1/Library/Arduino15/libraries isSingleLibrary=false location=ide
time="2025-01-03T18:17:09+01:00" level=info msg="Adding libraries dir" dir=/Users/user1/Documents/Arduino/libraries isSingleLibrary=false location=user
2025-01-03 18:17:10.616 Arduino IDE[6432:39780] +[IMKClient subclass]: chose IMKClient_Legacy
2025-01-03 18:17:10.616 Arduino IDE[6432:39780] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
2025-01-03T17:17:11.305Z root INFO Deploy plugins list: 1340.9 ms [Finished 4.842 s after backend start]
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2025-01-03T17:17:14.913Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 1071.1 ms [Finished 6.541 s after frontend start]
2025-01-03T17:17:14.965Z root WARN A command editor.action.toggleStickyScroll is already registered.
2025-01-03T17:17:15.442Z root WARN Frontend keybindings.onStart took longer than the expected maximum 100 milliseconds: 238.8 ms [Finished 6.852 s after frontend start]
2025-01-03T17:17:15.559Z root WARN Frontend menus.onStart took longer than the expected maximum 100 milliseconds: 253.3 ms [Finished 7.119 s after frontend start]
2025-01-03T17:17:15.597Z root WARN Frontend h.onStart took longer than the expected maximum 100 milliseconds: 114.7 ms [Finished 7.263 s after frontend start]
2025-01-03T17:17:16.116Z root WARN Frontend D.onStart took longer than the expected maximum 100 milliseconds: 476.5 ms [Finished 7.789 s after frontend start]

Tried the nightly build (20241212) but no success.

Removed ~/Documents/Arduino and re-created this folder, and opened Finder and right clicked on Keep Downloaded. And now it's working!
Not sure if it was related to wiping the content of the folder, or if it's some async task like downloading all folder content (if offloaded to iCloud when using this) never finishes (or takes "forever")?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

7 participants