cancel
Showing results for 
Search instead for 
Did you mean: 

stm32cubemx fails to download packages

dimmorpheus
Associate II

stm32cubemx fails to download packages due to inability to authorize at "myST->login".

According to the crash dump it has happend because of jxbrowser plugin-7.30.2 (chomium version 108.0.5359.215).

All extended attributes had been cleared (not trusted software etc), all neccessary execution bits are set, firewall is turned off.
Please see the log below.

Could anybody help me? Is there any other way to autorise the app?

Log:

 

 
Spoiler
Exception in thread "Browser Thread: af1bad7e-9d54-4fea-bf81-810f805fadf1" Exception in thread "Render Thread: 1e9167c2-a7d4-47ff-a51f-8766ace40d51" java.lang.IllegalStateException: Failed to receive the response.
at com.teamdev.jxbrowser.internal.rpc.transport.RpcThreadCallExecutor.execute(RpcThreadCallExecutor.java:43)
at com.teamdev.jxbrowser.internal.rpc.ServiceConnectionImpl.invoke(ServiceConnectionImpl.java:213)
at com.teamdev.jxbrowser.frame.internal.FrameImpl.document(FrameImpl.java:449)
at com.st.microxplorer.plugins.userauth.WebApp.findElementsByTagName(WebApp.java:723)
at com.st.microxplorer.plugins.userauth.WebApp.removeUnecessaryTags(WebApp.java:806)
at com.st.microxplorer.plugins.userauth.WebApp.lambda$new$9(WebApp.java:193)
at com.teamdev.jxbrowser.event.internal.NewObservableHelper.notifyObservers(NewObservableHelper.java:57)
at com.teamdev.jxbrowser.internal.rpc.stream.EventStream.dispatch(EventStream.java:74)
at com.teamdev.jxbrowser.internal.rpc.stream.EventStream.process(EventStream.java:126)
at com.teamdev.jxbrowser.internal.rpc.stream.Stream$StreamObserver.lambda$onNext$0(Stream.java:167)
at com.teamdev.jxbrowser.internal.RpcThreadImpl$TaskRunner.processTasks(RpcThreadImpl.java:172)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalStateException: The connection has been closed.
at com.teamdev.jxbrowser.internal.rpc.transport.RpcThreadCallExecutor.lambda$execute$0(RpcThreadCallExecutor.java:35)
at com.teamdev.jxbrowser.deps.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:79)
at com.teamdev.jxbrowser.deps.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:70)
at com.teamdev.jxbrowser.internal.rpc.ServiceChannel$1.onError(ServiceChannel.java:76)
at com.teamdev.jxbrowser.internal.rpc.transport.SharedMemoryTransport.lambda$close$1(SharedMemoryTransport.java:132)
at java.base/java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
at com.teamdev.jxbrowser.internal.rpc.transport.SharedMemoryTransport.close(SharedMemoryTransport.java:130)
at com.teamdev.jxbrowser.internal.rpc.transport.RpcConnection.close(RpcConnection.java:51)
at com.teamdev.jxbrowser.internal.rpc.transport.ConnectionChecker.run(ConnectionChecker.java:41)
... 1 more
java.lang.NullPointerException: Cannot invoke "com.teamdev.jxbrowser.deps.com.google.protobuf.StringValue.getValue()" because the return value of "com.teamdev.jxbrowser.internal.rpc.UniversalServiceConnection.invoke(com.teamdev.jxbrowser.internal.rpc.ServiceMethod, com.teamdev.jxbrowser.deps.com.google.protobuf.Message)" is null
at com.teamdev.jxbrowser.browser.internal.BrowserImpl.url(BrowserImpl.java:448)
at com.st.microxplorer.plugins.userauth.WebApp.lambda$new$0(WebApp.java:169)
at com.teamdev.jxbrowser.frame.internal.FrameImpl.lambda$processCallback$2(FrameImpl.java:187)
at java.base/java.util.Optional.map(Optional.java:260)
at com.teamdev.jxbrowser.frame.internal.FrameImpl.processCallback(FrameImpl.java:187)
at com.teamdev.jxbrowser.internal.rpc.stream.CallbackStream.process(CallbackStream.java:181)
at com.teamdev.jxbrowser.internal.rpc.stream.Stream$StreamObserver.lambda$onNext$0(Stream.java:167)
at com.teamdev.jxbrowser.internal.RpcThreadImpl$TaskRunner.processTasks(RpcThreadImpl.java:172)
at java.base/java.lang.Thread.run(Thread.java:833)
11:41:50.010 ERROR The response observer has thrown an exception.
java.lang.IllegalStateException
at com.teamdev.jxbrowser.deps.com.google.common.base.Preconditions.checkState(Preconditions.java:494)
at com.teamdev.jxbrowser.internal.RpcThreadImpl.exitNestedLoop(RpcThreadImpl.java:137)
at com.teamdev.jxbrowser.internal.rpc.transport.RpcThreadCallExecutor.lambda$execute$0(RpcThreadCallExecutor.java:39)
at com.teamdev.jxbrowser.deps.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:79)
at com.teamdev.jxbrowser.deps.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:70)
at com.teamdev.jxbrowser.internal.rpc.ServiceChannel$1.onError(ServiceChannel.java:76)
at com.teamdev.jxbrowser.internal.rpc.transport.SharedMemoryTransport.lambda$close$1(SharedMemoryTransport.java:132)
at java.base/java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
at com.teamdev.jxbrowser.internal.rpc.transport.SharedMemoryTransport.close(SharedMemoryTransport.java:130)
at com.teamdev.jxbrowser.internal.rpc.transport.RpcConnection.close(RpcConnection.java:51)
at com.teamdev.jxbrowser.internal.rpc.transport.ConnectionChecker.run(ConnectionChecker.java:41)
at java.base/java.lang.Thread.run(Thread.java:833)
11:41:50.030 ERROR Chromium process exit code: 137
11:41:50.031 ERROR Crash dump dir: /Users/dimmorpheus/Library/Application Support/JxBrowser/7.30.2/CrashReports
2023-07-27 11:41:50,032 [ERROR] WebApp:339 - JxBrowser engine crashed! Exit code: 137

Screen Shot 2023-07-27 at 11.43.58 AM.png
 
21 REPLIES 21
Herve PIERROT
ST Employee

Hi @Piranha,

JxBrowser was present before the introduction of the "authentication" and used for other use-cases since several STM32CubeMX releases.

For the package size increase, it's more due to new features introduced with the v6.9.0 such as the Memory Management Tool for STM32U5 and STM32H5 for the moment, or the BootPath Management for secure project on the STM32H5 series.

Given that the OP seems to have either solved this issue or abandoned it, I'll continue this thread.

Have the very same problem since the user authentication has been introduced.

- OS (name + version)

Ubuntu 20.04
- Chromium crash reports contained in files with the *.dmp extension located under

Please find attached. Dumps may include STM32CubeIDE and STM32CubeMX attempts from 1.13.x and 6.9.x

Hello @scaprile 

In order to push the investigation further ,could you please launch CubeMX via  shell using this command of line :

java -jar -Djxbrowser.logging.level=ALL -Djxbrowser.logging.file=jxbrowser.log path/to/STM32CubeMX.exe

and then provide the generated  jxbrowser.log

I will be waiting for your feedback .

 

Thx

Ghofrane

 

Here you go:

/opt/st/STM32CubeMX/jre/bin/java -jar -Djxbrowser.logging.level=ALL -Djxbrowser.logging.file=jxbrowser.log /opt/st/STM32CubeMX/STM32CubeMX
...
2023-10-31 15:22:07,727 [ERROR] JxBrowserEngine:69 - Can't initiate JxBrowser engine com.teamdev.jxbrowser.engine.ChromiumProcessStartupFailureException: Process exit code: 133
Exception in thread "Thread-3" java.lang.NullPointerException: Cannot invoke "javax.swing.JComponent.setVisible(boolean)" because "this.webAppContainer" is null


Log attached, I see these
WARNING Failed to find libudev.so.0x.x.x

WARNING Failed to find libgcrypt.so.1x.x.x

Neither one is available for Ubuntu 20.04.
libudev0 can be provided by wrapping libudev1 https://github.com/archlinux/libudev0-shim , and Ubuntu 22.04 provides libudev0, but it does not provide libgcrypt.

17:49:02.497 DEBUG Starting chromium process... [OK]
17:49:02.534 DEBUG [Chromium] [1031/174902.534020:INFO:browsercore.cc(99)] BrowserCore::Init
17:49:07.555 DEBUG Chromium process exit code: 133

This is as deep as I can go now, let me know how to proceed further. IMHO jxbrowser needs to be updated.

Ghofrane GSOURI
ST Employee

Hello @scaprile 

Chromium crashed while loading libX11.so.6 or libX11-xcb.so.1 library ? Do you have X11 installed?

Thx

Ghofrane

Of course I have X11 or whatever Ubuntu 20.04 provides as such. However, libx11-xcb1 needed to be installed, that is not a dependency listed anywhere, AFAIK.

Now we are one step further, now Chromium crashes when I click on any login field. That is, I get a login window, and when I click to enter my username, I get the "Aw, Snap!" screen with Error code: SIGTRAP.
I tried 20.04 and 22.04. I even tried installing chromium-browser to see if this added a missing dependency, with no luck. Chromium crash files attached.

 

Hello @scaprile 

It seems JxBrowser now starts and executes some commands. However, there is still an error regarding the missing OpenGL library.

 

libGL.so.1: cannot open shared object file: No such file or directory


Could you please install it and see if the issue persists?

Thank you Ghofrane,
I added some other missing dependencies and got it to work now.
It still crashes on first try but the reload button works and I can login. Please find log and crash attached.

For the record, this is the list of libraries (Ubuntu 20.04):

libswt-gtk-4-jni libswt-gtk-4-java dbus-x11 libsm6 libusb-1.0 libncurses5 libnss3 libdrm2 libgbm1 libudev1 libx11-xcb1 libxcb-render-util0 libxcb-randr0 libxcb-shape0 libxcb-xfixes0 libxcb-sync1 libxcb-icccm4 libxcb-keysyms1 libxcb-image0 libxcb-util1 libxcb-xkb1 libxkbcommon-x11-0 libkmod2 libgl1-mesa-glx

These two are also useful to get rid of some logs, --no-install-recommends is a good friend.

libcanberra-gtk3-module packagekit-gtk3-module

 

Pierre_Jean_SINACOUTY
ST Employee

Hello @scaprile,

According to the crash dump, the system ran out of memory. Could you please tell us how much RAM this system has? ​Also, is the application executed directly on the hardware or through some sandbox such as docker or flatpak?

BR,

Pierre-Jean

Hello Pierre-Jean,

I have 32GB, though sometimes Firefox gets a big share, memory shouldn't be a problem.

I'm running on Docker. The host is a RHEL derivative.
I think we can then disregard this crash and call it a day, MX runs fine once all libraries detailed in my former post have been installed. If you want to dig deeper, count on me, though.

Best regards