Bug 1518055 - Arduino IDE fails to start
Summary: Arduino IDE fails to start
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: arduino
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Gianluca Sforna
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-28 04:03 UTC by Jerry
Modified: 2018-10-30 17:28 UTC (History)
10 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-10-27 16:15:01 UTC


Attachments (Terms of Use)

Description Jerry 2017-11-28 04:03:14 UTC
The Arduino IDE fails to start. Version 1.8.4 from the rpms also failed to work.

The program from the website [1] works fine.

Error output follows:

java.awt.HeadlessException
	at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
	at processing.app.Base.<init>(Base.java:206)
	at processing.app.Base.main(Base.java:135)

[jose@rigel ~]$ sudo rpm -qa | grep arduino
arduino-core-1.8.5-1.fc27.noarch
arduino-ctags-5.8-6.arduino11.fc27.x86_64
arduino-1.8.5-1.fc27.noarch
arduino-builder-1.3.25-1.fc27.x86_64
arduino-listSerialPortsC-1.4.0-1.fc27.x86_64
[jose@rigel ~]$

[1] https://www.arduino.cc/download_handler.php?f=/arduino-1.8.5-linux64.tar.xz

Comment 1 Gianluca Sforna 2017-11-28 11:05:51 UTC
Hi Jerry,
I just tried and on my F27 box I can correctly run both 1.8.4 and 1.8.5 from updates-testing.

I am suspecting you have not installed the correct java (the package from the website is self-contained so it will work)

Please try this:
dnf install java-1.8.0-openjdk

and let me know if that fixes the issue; if so, I'd probably need to change some require for the package.

Comment 2 Jerry 2017-11-28 11:13:26 UTC
Hi Gianluca,

Yes, that fixed the issue.  I thought I had the correct java installed but perhaps it was lost in the dnf upgrade to Fedora 27.

Thank you very much!

Comment 3 Gianluca Sforna 2017-11-28 11:55:06 UTC
It would be interesting to determine how the system got into this state. I checked the RPM and there is a "Requires: java" line so, unless java-headless wrongly provides it, I can't really understand how a system with arduino installed could lack java.

Anyway, closing.

Comment 4 Jerry 2017-11-28 12:03:03 UTC
I'm not sure what happened but the IDE was working in Fedora 26 before the upgrade.  As far as I know, I had not even run any java applications until I tried to update a sketch a few days ago.

Could it possibly be because I had the Oracle Java rpm installed (downloaded from their website)?  Wouldn't that be unrelated?

Comment 5 florian 2018-04-27 20:41:58 UTC
I encountered the same on a fresh install... 
I have not done anything special with this machine..

Error Output:
[dmk@monster ~]$ arduino
java.awt.HeadlessException
	at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
	at processing.app.Base.<init>(Base.java:206)
	at processing.app.Base.main(Base.java:135)


[dmk@monster ~]$ rpm -q rpm libsolv hawkey dnf
rpm-4.14.1-1.fc27.x86_64
libsolv-0.6.34-1.fc27.x86_64
Das Paket hawkey ist nicht installiert
dnf-2.7.5-2.fc27.noarch


[dmk@monster ~]$ java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

[dmk@monster ~]$ sudo dnf install java-1.8.0-openjdk
Letzte Prüfung auf abgelaufene Metadaten: vor 1:46:15 am Fr 27 Apr 2018 20:54:05 CEST.
Abhängigkeiten sind aufgelöst.
================================================================================
 Paket                  Arch       Version                    Paketquelle Größe
================================================================================
Installieren:
 java-1.8.0-openjdk     x86_64     1:1.8.0.171-1.b10.fc27     updates     242 k

Transaktionsübersicht
================================================================================
Installieren  1 Paket

Gesamte Downloadgröße: 242 k
Installationsgröße: 500 k
Ist dies in Ordnung? [j/N]:



Now it works...
So something is fishy with the dependencies of the packet i assume.

Comment 6 Sean Waite 2018-05-11 19:31:48 UTC
I hit the same on a clean Fedora 28 install

$ arduino
java.awt.HeadlessException
        at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
        at processing.app.Base.<init>(Base.java:206)
        at processing.app.Base.main(Base.java:135)

$ sudo dnf install java-1.8.0-openjdk
Failed to synchronize cache for repo 'Dropbox', disabling.
Last metadata expiration check: 0:46:52 ago on Fri 11 May 2018 02:43:06 PM EDT.
Dependencies resolved.
==========================================================================================
 Package                  Arch         Version                        Repository     Size
==========================================================================================
Installing:
 java-1.8.0-openjdk       x86_64       1:1.8.0.171-4.b10.fc28         updates       245 k

Transaction Summary
==========================================================================================
Install  1 Package

Total download size: 245 k
Installed size: 523 k
Is this ok [y/N]: y
Downloading Packages:
java-1.8.0-openjdk-1.8.0.171-4.b10.fc28.x86_64.rpm        673 kB/s | 245 kB     00:00    
------------------------------------------------------------------------------------------
Total                                                     402 kB/s | 245 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                  1/1 
  Installing       : java-1.8.0-openjdk-1:1.8.0.171-4.b10.fc28.x86_64                 1/1 
  Running scriptlet: java-1.8.0-openjdk-1:1.8.0.171-4.b10.fc28.x86_64                 1/1 
  Verifying        : java-1.8.0-openjdk-1:1.8.0.171-4.b10.fc28.x86_64                 1/1 

Installed:
  java-1.8.0-openjdk.x86_64 1:1.8.0.171-4.b10.fc28                                        

Complete!
$ arduino
Loading configuration...
Initializing packages...
Preparing boards...
Starting...



After installing the jdk, it works fine

Comment 7 Michal Hlavinka 2018-08-20 11:48:09 UTC
Same problem, here.
Package requires: java >= 1:1.8.0

Package java-11-openjdk provides java = 1:11
that is higher version and so dnf prefers it to install over 1.8.0 openjdk.
and java-11-openjdk requires java-11-openjdk-headless so that's why it is installed.

There are two options, either arduino should require 1.8.0 openjdk explicitly or there is a bug in java-11-openjdk that it provides something it should not.
Anyway, the way it is atm it looks broken from user's perspective

Comment 8 Wade Mealing 2018-10-06 23:01:40 UTC
This reproduced with Fedora 28 clean install, with the same fix.  The RPM requires must not work how you think / its documented to work

Re-opening, let me know if you don't want this re-opened and I can make another report.

Comment 9 Severin Gehwolf 2018-10-08 14:11:56 UTC
$ sudo dnf -q repoquery --whatprovides 'java >= 1:1.8.0' --repofrompath=foo,http://download.fedoraproject.org/pub/fedora/linux/updates/28/Everything/x86_64/ --repoid=foo
java-1.8.0-openjdk-1:1.8.0.181.b15-0.fc28.x86_64
java-11-openjdk-1:11.0.ea.28-2.fc28.i686
java-11-openjdk-1:11.0.ea.28-2.fc28.x86_64
java-openjdk-1:10.0.2.13-1.fc28.i686
java-openjdk-1:10.0.2.13-1.fc28.x86_64

So JDK 8, JDK 10 and JDK 11 would satisfy the requirement specified by arduino:
https://src.fedoraproject.org/rpms/arduino/blob/master/f/arduino.spec#_46

Note that none of the OpenJDK providers are -headless. It suggests that the selected JDK at runtime is 8 with only java-1.8.0-openjdk-headless installed. The dep must have been resolved by dnf, though. This isn't an OpenJDK bug (wrong provides), but an arduino bug.

This command could be used to verify that some non-headless OpenJDK is installed:

$ rpm -qa --qf '%{NAME}\n' | grep openjdk | sort

Comment 10 Gianluca Sforna 2018-10-11 08:35:13 UTC
I will push an arduino package that requires "java = 1:1.8.0" and be done with this; however I still fail to see how the reporters managed to get the package installed with only the headless variant.

Comment 11 Severin Gehwolf 2018-10-11 08:48:39 UTC
(In reply to Gianluca Sforna from comment #10)
> however I still fail to see how the reporters managed to get the
> package installed with only the headless variant.

Like I said above this would clarify what reporters ended up getting on their system to reproduce:

$ rpm -qa --qf '%{NAME}\n' | grep openjdk | sort

Installing arduino with java-11-openjdk and java-1.8.0-openjdk-headless will likely reproduce the problem. It's non-headless JDK 11, satisfying "java >= 1:1.8.0". Yet, java-1.8.0-openjdk-headless is the headless version. Then alternatives for java-1.8.0-openjdk have higher priority than JDK 11. So "/usr/bin/java" would point to JDK 8 headless. Yet, a non-headless JDK 11 is installed (which arduino perhaps doesn't use?).

Comment 12 Fedora Update System 2018-10-16 08:37:15 UTC
arduino-1.8.5-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c2329c10f5

Comment 13 Fedora Update System 2018-10-16 08:37:32 UTC
arduino-1.8.5-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5750f4fe30

Comment 14 Fedora Update System 2018-10-16 12:38:46 UTC
arduino-1.8.5-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c2329c10f5

Comment 15 Fedora Update System 2018-10-16 15:52:50 UTC
arduino-1.8.5-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5750f4fe30

Comment 16 Fedora Update System 2018-10-27 16:15:01 UTC
arduino-1.8.5-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-10-30 17:28:50 UTC
arduino-1.8.5-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.