Skip to content
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

ESP32Partitions tool doesn't work on GNU/Linux #4

Open
johannesmaibaum opened this issue Sep 10, 2018 · 7 comments
Open

ESP32Partitions tool doesn't work on GNU/Linux #4

johannesmaibaum opened this issue Sep 10, 2018 · 7 comments

Comments

@johannesmaibaum
Copy link

Pasting the relevant parts from #1 :

Using Arduino IDE 1.8.6 on Ubuntu 18.04, and trying both the beta of your tool from your releases page (dubbed 0.0.1) and the newest available ZIP file directly from the repo (dubbed 0.0.2 from your commit message), the only response after clicking on the menu item for the Partition Manager is this Java exception:

java.io.IOException: Cannot run program "reg": error=2, Datei oder Verzeichnis nicht gefunden
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at com.espressif.partitions.ESP32Partitions.run(ESP32Partitions.java:51)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.IOException: error=2, Datei oder Verzeichnis nicht gefunden
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 18 more

In a GNU/Linux system, the info that the tools is requesting from the Windows registry is usually provided by the environment variable called HOME.

@francis94c:
the Arduino IDE tools folder in 'My Documents' which contains the actual python script 'esp-partition.py' that builds the UI, is relative the home path.

is the tools folder for Arduino IDE relative to the path in this Home variable?

If you install the Arduino IDE using default paths, the standard path for the tools folder would be $HOME/Arduino/tools.

@francis94c
Copy link
Owner

Checkout the latest commit on master, extract the zip into your tools folder as you did before and see if works.

@johannesmaibaum
Copy link
Author

Now it throws:

java.lang.ArrayIndexOutOfBoundsException: 4
	at com.espressif.partitions.ESP32Partitions.run(ESP32Partitions.java:64)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@francis94c
Copy link
Owner

My Bad, That line was still relating to windows... I'm moving it now.

@francis94c
Copy link
Owner

I guess the latest commit will fix the issue now.

@johannesmaibaum
Copy link
Author

Now it doesn't throw an exception anymore, but I think that I'm now really affected by #1 , i.e. I don't see any message in the IDE, but there is also no GUI coming up.

Manually running python esp-partition.py from inside $HOME/Arduino/tools/ESP32Partitions/tool/ does bring up a GUI though.

In case you're wondering: python --version returns Python 2.7.15rc1 on my machine.

@francis94c
Copy link
Owner

@johannesmaibaum Do you have any other python version installed on your machine alongside the 2.7 you have?

@johannesmaibaum
Copy link
Author

@francis94c Yes, I have both Python 2 and Python 3 installed:

$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Both are installed from the standard Ubuntu repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants