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

uBuntu & Intellij - No permissions #39

Open
unenergizer opened this issue Feb 19, 2022 · 6 comments
Open

uBuntu & Intellij - No permissions #39

unenergizer opened this issue Feb 19, 2022 · 6 comments

Comments

@unenergizer
Copy link

Hello,

I am having difficulties getting Intellij to launch VisualVM using the "Run with VisualVM [ProjectName]."

I can see that it is some type of permission issue. However when I give full read, write, execute permissions to the file, it still doesn't work. The stacktrace is posted below.

Also, is /usr/share/visualvm/visualvm/lib/deployed/jdk15/linux/libprofilerinterface.so the correct file to start for Linux users?

Thank you!

java.lang.RuntimeException: [/var/run/host/usr/share/visualvm/visualvm/lib/deployed/jdk15/linux/libprofilerinterface.so, --jdkhome, /app/extra/android-studio/jre, --openid, 22076747502870]
	at krasa.visualvm.integration.VisualVMHelper.run(VisualVMHelper.java:147)
	at krasa.visualvm.integration.VisualVMHelper.openInVisualVM(VisualVMHelper.java:114)
	at krasa.visualvm.integration.VisualVMHelper.startVisualVM(VisualVMHelper.java:59)
	at krasa.visualvm.runner.RunnerUtils.runVisualVM(RunnerUtils.java:35)
	at krasa.visualvm.runner.RunVisualVMRunner.doExecute(RunVisualVMRunner.java:73)
	at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$execute$1(DefaultJavaProgramRunner.java:113)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
	at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$execute$2(DefaultJavaProgramRunner.java:112)
	at com.intellij.execution.ExecutionManager$startRunProfile$1.invoke(ExecutionManager.kt:65)
	at com.intellij.execution.ExecutionManager$startRunProfile$1.invoke(ExecutionManager.kt:19)
	at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:170)
	at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:69)
	at com.intellij.execution.impl.ExecutionManagerImpl$doStartRunProfile$startRunnable$1.run(ExecutionManagerImpl.kt:231)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:787)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:325)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:787)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.io.IOException: Cannot run program "/var/run/host/usr/share/visualvm/visualvm/lib/deployed/jdk15/linux/libprofilerinterface.so": error=13, Permission denied
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at krasa.visualvm.integration.VisualVMHelper$VisualVMProcess.run(VisualVMHelper.java:227)
	at krasa.visualvm.integration.VisualVMHelper.run(VisualVMHelper.java:137)
	... 41 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 44 more
	```
@krasa
Copy link
Owner

krasa commented Feb 19, 2022

@unenergizer
Copy link
Author

This is crazy. I can see the file in the terminal and in the file manager.

However the selection window in IntelliJ can not see the file. Below is a screen shot.

Screenshot from 2022-02-19 11-05-49

I will mention this. IntelliJ was installed using Flatpak and VisualVM was installed using a Ubuntu (deb) installer. I don't know if this has something to do with it.

@krasa
Copy link
Owner

krasa commented Feb 19, 2022

Could be read rights, could be a bug in IntelliJ, that file chooser component is quite special, with filters.

@krasa
Copy link
Owner

krasa commented Feb 19, 2022

Also the refresh is quite bugged, clicking reload and reopening the dialog might fix it.

@unenergizer
Copy link
Author

unenergizer commented Feb 19, 2022

Here is what I have found so far. Ubuntu and PopOS have an app store. IntelliJ and Android Studio are on this store. However, they are installed with Flatpack instead of a regular Debian file.

This is what I now know from trial and error. If I uninstall the flatpak version of android studio and IntelliJ. Restart computer. Then manually install the deb version (by going to intellij website and downloading it) then running it manually, it will FINALLY see the /usr/bin/visualvm file.

Apparently flatpak installed programs don't have full access to usr/bin/fileName.

I hope this information can help someone in the future!

@geirolz
Copy link

geirolz commented Mar 24, 2022

Hi, I'm having a similar problem. Using /usr/bin/jvisualvm once I click the button on IntelliJ the program runs but VisuamVM doesn't. Nothing happens, no errors notification from IntelliJ

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

3 participants