Skip to content

Menu don't show up in OSX High Sierra Menubar #6548

New issue

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

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

Already on GitHub? Sign in to your account

Closed
guidefreitas opened this issue Jul 25, 2017 · 60 comments
Closed

Menu don't show up in OSX High Sierra Menubar #6548

guidefreitas opened this issue Jul 25, 2017 · 60 comments
Assignees
Labels
Help wanted Arduino would especially appreciate assistance from the community on this item OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE
Milestone

Comments

@guidefreitas
Copy link

Menu don't show up in OSX High Sierra menubar.

S.O.: OSX High Sierra Beta 4

@facchinm facchinm added the OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE label Jul 25, 2017
@facchinm
Copy link
Member

Thanks a lot for reporting! Could you debug the problem a bit while we setup a Mac with that OS version? Launching the IDE via commandline and pasting here the output would be enough.
To launch the IDE simply execute /Applications/Arduino.app/Contents/MacOS/Arduino in a Terminal and any error should appear there. Thanks again!

@facchinm facchinm added the Waiting for feedback More information must be provided before we can proceed label Jul 25, 2017
@cmaglie
Copy link
Member

cmaglie commented Jul 25, 2017

and here we go again... :-)

@guidefreitas
Copy link
Author

Hi. Thanks for the fast feedback. Here is the log.

Last login: Tue Jul 25 00:26:48 on ttys000
➜ ~ /Applications/Arduino.app/Contents/MacOS/Arduino
[JmDNS(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).Timer] WARN javax.jmdns.impl.tasks.resolver.DNSResolverTask - ServiceResolver(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).run() exception
java.io.IOException: No route to host (sendto failed)
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:693)
at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1595)
at javax.jmdns.impl.tasks.resolver.DNSResolverTask.run(DNSResolverTask.java:74)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
[fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.JmDNSImpl - RECOVERING
[JmDNS(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).State.Timer] WARN javax.jmdns.impl.tasks.state.DNSStateTask - Canceler(fe80-0-0-0-aede-48ff-fe00-1122-en5.local.).run() exception
java.io.IOException: No route to host (sendto failed)
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:693)
at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1595)
at javax.jmdns.impl.tasks.state.DNSStateTask.run(DNSStateTask.java:131)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
[fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.DNSStatefulObject$DefaultImplementation - Wait for canceled timed out: DNS: fe80-0-0-0-aede-48ff-fe00-1122-en5.local. [fe80:0:0:0:aede:48ff:fe00:1122%en5/fe80:0:0:0:aede:48ff:fe00:1122%en5] state: canceling 1 task: null
[fe80-0-0-0-aede-48ff-fe00-1122-en5.local..recover()] WARN javax.jmdns.impl.JmDNSImpl - fe80-0-0-0-aede-48ff-fe00-1122-en5.local.recover() Could not recover we are Down!

@naturfenomen
Copy link

I'm on High Sierra public beta 3 and i's the same problem for me - i.e. no menu except for 'Arduino'. But no error when starting from Terminal.

@facchinm
Copy link
Member

Also reported here and here. It looks like this problem affects all Java8 programs, so it's very likely to be solved by Apple in one of the next betas. Keeping the issue open to track the issue anyway

@per1234 per1234 removed the Waiting for feedback More information must be provided before we can proceed label Aug 4, 2017
@cstatz
Copy link

cstatz commented Aug 8, 2017

This is still an issue for Public Beta 4!

@jaxxon33
Copy link

Same issue with Developer Beta version 5, Aug 9 2017.

@facchinm
Copy link
Member

Argh, this is bad...

@optikfluffel
Copy link

As a workaround for now you could install the legacy Java 6 runtime.

@jaxxon33
Copy link

I have 2 MacBooks running High Sierra, one has Java 8 Update 121 and works fine with Arduino IDE, the other has Update 144 (currently latest) and has the 'no menu' problem.

@vgiffin
Copy link

vgiffin commented Aug 26, 2017

I saw this on Beta 3 (17A306f), but not on Beta 4 (17A315i) or later.

@ghost
Copy link

ghost commented Sep 8, 2017

Still on developer beta 9 (17A360a) with Java 8 Update 144...

@facchinm facchinm added this to the Next milestone Sep 12, 2017
@xDuk3x
Copy link

xDuk3x commented Sep 21, 2017

Same Error on Golden Master (17A362a) with Java 121 & 144

@facchinm
Copy link
Member

Adding other resources:
https://youtrack.jetbrains.com/issue/JRE-434#comment=27-2424694
https://bugs.eclipse.org/bugs/show_bug.cgi?id=520176

Trying to implement something similar to https://git.eclipse.org/r/#/c/105553/ and post a PR soon

@facchinm
Copy link
Member

Modifying Info.plist has no effect on OSX High Sierra GM . Following the discussion on Eclipse bugtracker, it looks like SWT has just been patched to overcome a bug in the latest OSX builds (DefaultApp.nib only present in /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/en.lproj folder)
see https://git.eclipse.org/r/#/c/105582/

to sum up:

  • changing the WHOLE system locale to english works
  • installing java6 doesn't work anymore on GM
  • modifying Info.plist doesn't work in GM
  • Arduino doesn't use SWT, but a similar workaround could be implemented in Swing (by Oracle/OpenJDK) sooner or later
  • Apple could fix the bug before Monday 25/09 (release date)

In the meantime, let's use this thread to report any improvement.

@facchinm facchinm added the Help wanted Arduino would especially appreciate assistance from the community on this item label Sep 22, 2017
@McAlb
Copy link

McAlb commented Sep 26, 2017

I have just installed the brand spanking and official new High Sierra release. Menu bar is still not working. Changing the language to english works....

@puybaret
Copy link

You could set apple.laf.useScreenMenuBar property to true only if the current system is not macOS 10.13 and the application menu isn't empty. Something like:

System.setProperty("apple.laf.useScreenMenuBar",
   String.valueOf(!System.getProperty("os.version").startsWith("10.13")
        || com.apple.eawt.Application.getApplication().isAboutMenuItemPresent()));

This is the solution I programmed in Sweet Home 3D. At least, the menu bar appears at the top of the window the time that Apple fixes the bug (just copy the DefaultApp.nib file of your locale from a previous macOS version and you'll see that the menu bar will go back to the screen menu bar, except if Apple decides to fix this issue another way).
Note that isAboutMenuItemPresent was removed under Java 9, where you should rather call Desktop.isSupported(Desktop.Action.APP_ABOUT) (you may also program that statement with reflection if needed)

@facchinm
Copy link
Member

@puybaret , doesn't apple.laf.useScreenMenuBar need to be set before the GUI thread is spawned? Anyway, thanks for the tip, trying right now

@puybaret
Copy link

It's not because you have to set this property before playing with Swing, that it cannot be set at the beginning of the program execution.

@facchinm
Copy link
Member

Here's the PR #6763
I only tested it briefly on my colleague's OSX but I couldn't reproduce the issue (I should have rebooted probably, will try later). In the meantime, the build from the PR should be ready in 20 minutes, if anyone can test it it would be great.

@puybaret
Copy link

Be sure to test on a system that doesn't use English as primary language

@facchinm
Copy link
Member

@facchinm
Copy link
Member

image
Ugly but at least usable

@McAlb
Copy link

McAlb commented Sep 27, 2017

yeah! You did it, it works. In my case in german... Thanks!!

@GaelC92
Copy link

GaelC92 commented Sep 27, 2017

For what it's worth, here is what I obtain from the previous (without the latest patch) version when calling from command line.
This hints that the problem probably does neither lie within JRE nor within the application code.
I believe it's the appbundler but I cannot find what it does to make the menu fail.
@facchinm , maybe you could spot a difference in the env vars or java settings passed to the main class at startup ? (I could not until now)

capture d ecran 2017-09-27 a 18 04 31

@facchinm
Copy link
Member

I just merged the patch on master so it would be supercool if you could test the hourly build as soon as it's ready. If everything is ok we can release soon and provide a workaround for all mac users willing to update. Thanks everyone for the help.

@McAlb
Copy link

McAlb commented Sep 27, 2017

hourly build works like PR-6763-BUILD-731 - this time with german menus

@McAlb
Copy link

McAlb commented Sep 28, 2017

right! it really seem to be a java-issue

@AdrianBuza
Copy link

I found a simpler workaround. Force the language to English for the .app.
Open a Terminal and run:
defaults write cc.arduino.Arduino AppleLanguages '(en)'

@manolivette
Copy link

La solution de AdrianBuza ok pour moi.

@fschlag
Copy link

fschlag commented Sep 30, 2017

@AdrianBuza solution works for Arduino on a German Mac OS X 10.13 without using the nightlies/dailies. I am using version 1.8.4.

@ipsecguy
Copy link

Workaround with defaults works here also (German High Sierra machine).

@kuerb
Copy link

kuerb commented Oct 2, 2017

@AdrianBuza After installing the Teensyduino Add-on, these defaults seem to be ignored.

As another workaround I've used the freeware Language Switcher set to always open the Arduino app in English. I am not sure which flags the app changes, but it seems to be working.

@facchinm
Copy link
Member

facchinm commented Oct 2, 2017

Cross referencing the official blog post https://blog.arduino.cc/2017/10/02/arduino-ide-1-8-5-hotfix-for-macos-high-sierra-users/

Closing as fixed, thanks everyone!

@facchinm facchinm closed this as completed Oct 2, 2017
@PaulStoffregen
Copy link
Contributor

After installing the Teensyduino Add-on, these defaults seem to be ignored.

Please post a message about this Teensy-specific problem here.

https://forum.pjrc.com/threads/46745-Teensyduino-1-40-Beta-2

Let's not bother Arduino with issues from Teensy.

@schwabe
Copy link

schwabe commented Oct 9, 2017

Just for people (like me) who end up with teensy installed. It changes the package name and

defaults write cc.arduino.Arduino.teensyduino AppleLanguages '(en)'

works for that as workaround.

@jandrioli
Copy link

This is happening on Linux too. I'm on Ubuntu 16.04 x64, Java openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

The source of the problem is a failing DNS request. If I start the Arduino IDE with access to the internet, and then switch access-points, it will lockup and we get this "we are down!" log. Also, subsequently launching the Arduino IDE without access to internet brings the same problem.

@facchinm
Copy link
Member

@jandrioli the missing menubar on Linux is likely to be a VERY different kind of bug. Feel free to open another issue with all the needed information (like screenshots). The "we are down" message is generated by mdns resolver and doesn't affect anything except the ability to perform network uploads

@jandrioli
Copy link

jandrioli commented Feb 13, 2018 via email

@facchinm
Copy link
Member

@jandrioli in fact, this is why I asked you to open a different issue to track the jmdns problem 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Arduino would especially appreciate assistance from the community on this item OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE
Projects
None yet
Development

Successfully merging a pull request may close this issue.