WarningImHack3r / npm-update-dependencies

Update NPM dependencies from your IDE
https://plugins.jetbrains.com/plugin/21105-npm-update-dependencies
9 stars 2 forks source link

[crash] Fail to parse specific versions of `react-dom` #94

Closed alex-nikols closed 6 months ago

alex-nikols commented 6 months ago

What is the issue?

unknown

What are the steps to reproduce this issue?

unknown

What were you expecting to happen?

I was running npm install and it suddenly threw this warning, and stopped.

Paste any relevant logs, error output, etc.

com.intellij.diagnostic.PluginException: annotator: com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator@3e2230c6 (class com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator) [Plugin: com.github.warningimhack3r.npmupdatedependencies]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.processError(ExternalToolPass.java:253)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:212)
    at com

<TRIMMED STACKTRACE>

What OS are you experiencing the problem on?

macOS

Additional platform information

Build version: WebStorm 2023.3.2 Build: #WS-233.13135.92 December 19, 2023 JRE: 17.0.9+7-b1087.9, JetBrains s.r.o. JVM: 17.0.9+7-b1087.9, OpenJDK 64-Bit Server VM, JetBrains s.r.o. Operating System: Mac OS X 14.4.1 (aarch64)

=== Plugins === Custom plugins: [NPM Update Dependencies (2.2.0), AI Assistant (233.13135.116)] Disabled plugins:[]

Duplicates

WarningImHack3r commented 6 months ago

Hi there, sorry for the issue. I never met such an issue and as your report doesn't have much detail I cannot try to reproduce it or diagnose it.

Is it possible for you to give me more details or a way to reproduce it? If not I'll have to close this issue until you can, unfortunately...

WarningImHack3r commented 6 months ago

Edit: you can actually enable the logs of my plugins that I introduced in this version. To do so:

  1. Enable my plugin's logs by setting the line below in Help > Diagnostic Tools > Debug Log Settings…:
    #com.github.warningimhack3r.npmupdatedependencies
  2. Restart your IDE, reproduce the bug and open the idea.log file you find by going to Help > Show Log in Finder
  3. In there, if you can send me the 20/30-ish lines above the crash I could try to diagnose your issue!
oskarhertzman commented 6 months ago

Same error here, it freezes on Scanning for updates (59/127). Probably related?

WarningImHack3r commented 6 months ago

@oskarhertzman same thing, can you enable logs and give me some info?

WarningImHack3r commented 6 months ago

@alex-nikols @oskarhertzman can you both send me (if you can) your package.json dependencies and devDependencies so I can try to reproduce your issue locally?

jmcpeak commented 6 months ago

I'm having the same issue.

com.intellij.diagnostic.PluginException: annotator: com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator@651aeac5 (class com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator) [Plugin: com.github.warningimhack3r.npmupdatedependencies]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.processError(ExternalToolPass.java:253)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:212)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:203)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$0(ExternalToolPass.java:164)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass.runChangeAware(ExternalToolPass.java:268)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$2(ExternalToolPass.java:164)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$15(BackgroundTaskUtil.java:371)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:366)
    at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:162)
    at com.intellij.util.ui.update.ContextAwareUpdate.run$lambda$1$lambda$0(ContextAwareUpdate.kt:49)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
    at com.intellij.util.ui.update.ContextAwareUpdate.run(ContextAwareUpdate.kt:48)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:354)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:344)
    at com.intellij.util.ui.update.MergingUpdateQueue.doFlush(MergingUpdateQueue.java:301)
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:283)
    at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:250)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
    at com.intellij.util.Alarm$Request.lambda$runSafely$0(Alarm.java:369)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:253)
    at com.intellij.util.Alarm$Request.runSafely(Alarm.java:369)
    at com.intellij.util.Alarm$Request.run(Alarm.java:356)
    at com.intellij.util.concurrency.Propagation.contextAwareCallable$lambda$2(propagation.kt:357)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
    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)
Caused by: java.lang.NumberFormatException: For input string: "9a"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
    at java.base/java.lang.Long.parseLong(Long.java:711)
    at java.base/java.lang.Long.parseLong(Long.java:836)
    at org.semver4j.internal.Comparator.compareIdentifiers(Comparator.java:92)
    at org.semver4j.internal.Comparator.preReleaseCompare(Comparator.java:72)
    at org.semver4j.internal.Comparator.compareTo(Comparator.java:25)
    at org.semver4j.Semver.compareTo(Semver.java:328)
    at org.semver4j.Semver.compareTo(Semver.java:20)
    at kotlin.comparisons.ReverseOrderComparator.compare(Comparisons.kt:324)
    at kotlin.comparisons.ReverseOrderComparator.compare(Comparisons.kt:323)
    at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:356)
    at java.base/java.util.TimSort.sort(TimSort.java:234)
    at java.base/java.util.Arrays.sort(Arrays.java:1233)
    at kotlin.collections.ArraysKt___ArraysJvmKt.sortWith(_ArraysJvm.kt:2179)
    at kotlin.collections.CollectionsKt___CollectionsKt.sortedWith(_Collections.kt:1075)
    at kotlin.collections.CollectionsKt___CollectionsKt.sortedDescending(_Collections.kt:1063)
    at com.github.warningimhack3r.npmupdatedependencies.backend.engine.PackageUpdateChecker.areUpdatesAvailable(PackageUpdateChecker.kt:114)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invokeSuspend(UpdatesAnnotator.kt:69)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(UpdatesAnnotator.kt)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(UpdatesAnnotator.kt)
    at com.github.warningimhack3r.npmupdatedependencies.backend.extensions.ExtensionsKt$parallelMap$1$1$1$1.invokeSuspend(Extensions.kt:10)
    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)

package.json package-lock.json

WarningImHack3r commented 6 months ago

Thank you @jmcpeak!! Now I have enough info to fix that, the full crash log is already very useful by itself! Taking a look once I’m home

jmcpeak commented 6 months ago

I disabled/enabled the plugin and then got this error too (not sure if they are related)

By the way, thank you for making this plugin, it is a huge time saver!

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'com.github.warningimhack3r.npmupdatedependencies.ui.actions.update.UpdateAllSatisfiesAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: com.github.warningimhack3r.npmupdatedependencies]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
    at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
    at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)
WarningImHack3r commented 6 months ago

Thanks, I’ll fix that in the meantime 😅

WarningImHack3r commented 6 months ago

@jmcpeak @alex-nikols @oskarhertzman Turns out it was not a problem with my code (if you all got the same kind of Caused by: line(s) in the full crash log): it's a version parsing problem within a library I use, which was triggered (only?) by some versions of react-dom that don't really follow the Semver convention. It was ironically just fixed 18 hours ago, so a simple library upgrade fixed it!

jmcpeak commented 6 months ago

You gotta love it... thank you

oskarhertzman commented 6 months ago

Thank you so much for spending time looking into this!

jmcpeak commented 6 months ago

Just installed, it works great, thanks again!

WarningImHack3r commented 6 months ago

Thank you so much for spending time looking into this!

No problem! I can’t let my plugin with crashes haha, had to do something to keep it reliable :) thanks for the support tho!

WarningImHack3r commented 6 months ago

Just installed, it works great, thanks again!

Good to know!! I was very surprised to see it has been reviewed and published by JetBrains that fast, it usually takes 2 days haha