flathub / com.jetbrains.IntelliJ-IDEA-Community

https://flathub.org/apps/details/com.jetbrains.IntelliJ-IDEA-Community
14 stars 11 forks source link

Android emulator is not working #156

Closed chardinson closed 1 week ago

chardinson commented 9 months ago

Fedora Silverblue 39 Flatpak 1.15.6 IntelliJ IDEA: 2023.3

Only happens with Flatpak, with snap and .tar.gz it works fine.

2023-12-11 14:41:50,251 [   7562]   WARN - #com.android.ddmlib - * daemon not running; starting now at tcp:5037
2023-12-11 14:41:50,294 [   7605]   WARN - #com.android.ddmlib - * daemon started successfully
2023-12-11 14:41:54,882 [  12193]   WARN - #c.i.s.ComponentManagerImpl - com.android.tools.idea.res.ResourceUpdateTracer initializer requests com.android.tools.idea.res.ResourceUpdateTraceSettings instance
2023-12-11 14:42:01,137 [  18448]   WARN - #c.i.s.ComponentManagerImpl - com.android.tools.idea.devicemanagerv2.OverflowButton initializer requests org.jetbrains.android.AndroidPluginDisposable instance
2023-12-11 14:42:03,696 [  21007]   WARN - Emulator: Pixel 7 API 34 - File System is not ext4, disable QuickbootFileBacked feature
2023-12-11 14:42:03,937 [  21248]   WARN - Emulator: Pixel 7 API 34 - Your GPU drivers may have a bug. Switching to software rendering.
2023-12-11 14:42:04,129 [  21440]   WARN - Emulator: Pixel 7 API 34 - *** Basic token auth should only be used by android-studio ***
2023-12-11 14:42:04,183 [  21494]   WARN - Emulator: Pixel 7 API 34 - Device 'cache' does not have the requested snapshot 'default_boot'
2023-12-11 14:42:04,184 [  21495]   WARN - Emulator: Pixel 7 API 34 - Failed to load snapshot 'default_boot'
2023-12-11 14:42:04,184 [  21495]   WARN - Emulator: Pixel 7 API 34 - Failed to process .ini file /var/home/chardinson/.android/emu-update-last-check.ini for reading.
2023-12-11 14:42:04,819 [  22130]   WARN - Emulator: Pixel 7 API 34 - Failed to process .ini file /var/home/chardinson/.android/emu-update-last-check.ini for reading.
2023-12-11 14:42:04,939 [  22250] SEVERE - Emulator: Pixel 7 API 34 - Received bad foldable posture when trying to send gRPC notification, posture value: 0
2023-12-11 14:42:04,940 [  22251] SEVERE - Emulator: Pixel 7 API 34 - IntelliJ IDEA 2023.3  Build #IC-233.11799.241
2023-12-11 14:42:04,940 [  22251] SEVERE - Emulator: Pixel 7 API 34 - JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-12-11 14:42:04,940 [  22251] SEVERE - Emulator: Pixel 7 API 34 - OS: Linux
2023-12-11 14:42:06,356 [  23667]   WARN - #c.i.s.ComponentManagerImpl - com.android.tools.idea.file.explorer.toolwindow.options.DeviceFileExplorerSettings PluginClassLoader(plugin=PluginDescriptor(name=Android, id=org.jetbrains.android, descriptorPath=plugin.xml, path=~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/data/JetBrains/IdeaIC2023.3/android, version=233.11799.272, package=null, isBundled=false), packagePrefix=null, state=active)
java.lang.ClassNotFoundException: com.android.tools.idea.file.explorer.toolwindow.options.DeviceFileExplorerSettings PluginClassLoader(plugin=PluginDescriptor(name=Android, id=org.jetbrains.android, descriptorPath=plugin.xml, path=~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/data/JetBrains/IdeaIC2023.3/android, version=233.11799.272, package=null, isBundled=false), packagePrefix=null, state=active)
    at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:2255)
    at com.intellij.serviceContainer.ServiceDescriptorInstanceInitializer.loadInstanceClass(ServiceInstanceInitializer.kt:62)
    at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.instanceClass(LazyInstanceHolder.kt:54)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses2$process(ComponentManagerImpl.kt:1882)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses2(ComponentManagerImpl.kt:1901)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses(ComponentManagerImpl.kt:1831)
    at com.intellij.settingsSync.SettingsSyncFilteringKt.findComponentClasses(SettingsSyncFiltering.kt:77)
    at com.intellij.settingsSync.SettingsSyncFilteringKt.isSyncEnabled(SettingsSyncFiltering.kt:17)
    at com.intellij.settingsSync.SettingsSyncIdeMediatorImpl.write(SettingsSyncIdeMediatorImpl.kt:155)
    at com.intellij.configurationStore.CompoundStreamProvider.write(CompoundStreamProvider.kt:34)
    at com.intellij.configurationStore.XmlElementStorage$XmlElementStorageSaveSessionProducer$SaveExecutor.save(XmlElementStorage.kt:163)
    at com.intellij.configurationStore.SaveExecutorKt.executeSave(SaveExecutor.kt:86)
    at com.intellij.configurationStore.SaveExecutorKt.saveSessions(SaveExecutor.kt:80)
    at com.intellij.configurationStore.SaveSessionProducerManager.save$suspendImpl(SaveExecutor.kt:72)
    at com.intellij.configurationStore.SaveSessionProducerManager.save(SaveExecutor.kt)
    at com.intellij.configurationStore.ApplicationStoreImpl$doSave$3$1.invokeSuspend(ApplicationStoreImpl.kt:64)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
2023-12-11 14:42:06,359 [  23670]   WARN - #c.i.s.ComponentManagerImpl - com.android.tools.idea.device.explorer.files.options.DeviceFileExplorerSettings PluginClassLoader(plugin=PluginDescriptor(name=Android, id=org.jetbrains.android, descriptorPath=plugin.xml, path=~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/data/JetBrains/IdeaIC2023.3/android, version=233.11799.272, package=null, isBundled=false), packagePrefix=null, state=active)
java.lang.ClassNotFoundException: com.android.tools.idea.device.explorer.files.options.DeviceFileExplorerSettings PluginClassLoader(plugin=PluginDescriptor(name=Android, id=org.jetbrains.android, descriptorPath=plugin.xml, path=~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/data/JetBrains/IdeaIC2023.3/android, version=233.11799.272, package=null, isBundled=false), packagePrefix=null, state=active)
    at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:2255)
    at com.intellij.serviceContainer.ServiceDescriptorInstanceInitializer.loadInstanceClass(ServiceInstanceInitializer.kt:62)
    at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.instanceClass(LazyInstanceHolder.kt:54)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses2$process(ComponentManagerImpl.kt:1882)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses2(ComponentManagerImpl.kt:1901)
    at com.intellij.serviceContainer.ComponentManagerImpl.processAllImplementationClasses(ComponentManagerImpl.kt:1831)
    at com.intellij.settingsSync.SettingsSyncFilteringKt.findComponentClasses(SettingsSyncFiltering.kt:77)
    at com.intellij.settingsSync.SettingsSyncFilteringKt.isSyncEnabled(SettingsSyncFiltering.kt:17)
    at com.intellij.settingsSync.SettingsSyncIdeMediatorImpl.write(SettingsSyncIdeMediatorImpl.kt:155)
    at com.intellij.configurationStore.CompoundStreamProvider.write(CompoundStreamProvider.kt:34)
    at com.intellij.configurationStore.XmlElementStorage$XmlElementStorageSaveSessionProducer$SaveExecutor.save(XmlElementStorage.kt:163)
    at com.intellij.configurationStore.SaveExecutorKt.executeSave(SaveExecutor.kt:86)
    at com.intellij.configurationStore.SaveExecutorKt.saveSessions(SaveExecutor.kt:80)
    at com.intellij.configurationStore.SaveSessionProducerManager.save$suspendImpl(SaveExecutor.kt:72)
    at com.intellij.configurationStore.SaveSessionProducerManager.save(SaveExecutor.kt)
    at com.intellij.configurationStore.ApplicationStoreImpl$doSave$3$1.invokeSuspend(ApplicationStoreImpl.kt:64)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
2023-12-11 14:42:30,556 [  47867]   WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/streamClipboard call failed - UNAVAILABLE: io exception
2023-12-11 14:42:30,556 [  47867]   WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/sendKey call failed - UNAVAILABLE: io exception
2023-12-11 14:42:30,555 [  47866]   WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/setClipboard call failed - UNAVAILABLE: io exception
2023-12-11 14:42:30,555 [  47866]   WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/streamScreenshot call failed - UNAVAILABLE: io exception
2023-12-11 14:42:30,555 [  47866]   WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/streamNotification call failed - UNAVAILABLE: io exception
2023-12-11 14:42:30,721 [  48032] SEVERE - Emulator: Pixel 7 API 34 - Emulator terminated with exit code 139
java.lang.Throwable: Emulator terminated with exit code 139
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
    at com.android.tools.idea.avdmanager.EmulatorProcessHandler$ConsoleListener.onTextAvailable(EmulatorProcessHandler.kt:89)
    at com.intellij.execution.process.ProcessHandler$2.onTextAvailable(ProcessHandler.java:289)
    at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:220)
    at com.intellij.execution.process.ProcessTerminatedListener.processTerminated(ProcessTerminatedListener.java:57)
    at com.intellij.execution.process.ProcessHandler$2.processTerminated(ProcessHandler.java:259)
    at com.intellij.execution.process.ProcessHandler.lambda$notifyTerminated$2(ProcessHandler.java:204)
    at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:322)
    at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:187)
    at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:183)
    at com.intellij.execution.process.BaseProcessHandler.onOSProcessTerminated(BaseProcessHandler.java:59)
    at com.intellij.execution.process.BaseOSProcessHandler$1.lambda$startNotified$0(BaseOSProcessHandler.java:82)
    at com.intellij.execution.process.ProcessWaitFor.lambda$new$0(ProcessWaitFor.java:45)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
    at com.intellij.execution.process.ProcessWaitFor.lambda$new$1(ProcessWaitFor.java:23)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)
2023-12-11 14:42:30,729 [  48040] SEVERE - Emulator: Pixel 7 API 34 - IntelliJ IDEA 2023.3  Build #IC-233.11799.241
2023-12-11 14:42:30,729 [  48040] SEVERE - Emulator: Pixel 7 API 34 - JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-12-11 14:42:30,730 [  48041] SEVERE - Emulator: Pixel 7 API 34 - OS: Linux
2023-12-11 14:42:30,730 [  48041] SEVERE - Emulator: Pixel 7 API 34 - Plugin to blame: Android version: 233.11799.272
x80486 commented 9 months ago

Would you like to describe how do you reproduce this? At what point this fails and how?

I've never used the Android Emulator. Do you have the Android (and maybe Android Design Tools) enabled?

This looks like a usual ClassNotFoundException where you would have to add the missing JARs which has the missing class(es) to the classpath :monocle_face:

chardinson commented 9 months ago

Would you like to describe how do you reproduce this? At what point this fails and how?

I've never used the Android Emulator. Do you have the Android (and maybe Android Design Tools) enabled?

This looks like a usual ClassNotFoundException where you would have to add the missing JARs which has the missing class(es) to the classpath 🧐

This seems to occur when using hardware templates from devices such as "Google Pixel 7", etc. This issue started occurring as of IntelliJ IDEA version 2023.3. It does not occur when I select custom hardware specifications (RAM size, cores, screen dimensions, etc.).

Once I identify the cause, I will discuss it here.

chardinson commented 4 months ago

This only happens with emulators that are configured to use software acceleration.

Certain emulator templates do not allow you to switch between software or hardware acceleration, I have noticed this on the ones that contain Play Store.

x80486 commented 4 months ago

@chardinson, just to confirm: is this happening with the Flatpak release only, or with this IDEA edition, regardless?

I don't really have a way to replicate this issue, but if it happens to the IDE in general, regardless of the packaging format, I can try to create an issue in YouTrack.

chardinson commented 4 months ago

I tested this on GNOME OS with Flatpak version 1.15.8, which is the same version used in Fedora Silverblue, and it worked without problems with GNOME OS, it seems that this problem is not directly related to IntelliJ IDEA Flatpak, I will investigate more about it to report the problem in the right place.

If it is ok with you, we can close this issue, as it is not related here.