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

Exception in plugin Liferay Intellij Plugin #81

Open
simon387 opened this issue Sep 4, 2018 · 7 comments
Open

Exception in plugin Liferay Intellij Plugin #81

simon387 opened this issue Sep 4, 2018 · 7 comments

Comments

@simon387
Copy link

simon387 commented Sep 4, 2018

random appears while working in Intellij

update failed for AnAction(com.liferay.ide.idea.ui.actions.LiferayActionGroup) with ID=LiferayActionGroup

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of com/intellij/openapi/module/ModuleUtilCore.findModuleForFile must not be null
	at com.intellij.openapi.module.ModuleUtilCore.$$$reportNull$$$0(ModuleUtilCore.java)
	at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java)
	at com.liferay.ide.idea.ui.actions.WatchGradleModuleAction.isEnabledAndVisible(WatchGradleModuleAction.java:99)
	at com.liferay.ide.idea.ui.actions.LiferayActionGroup.lambda$update$3(LiferayActionGroup.java:46)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.LongPipeline.reduce(LongPipeline.java:438)
	at java.util.stream.LongPipeline.sum(LongPipeline.java:396)
	at java.util.stream.ReferencePipeline.count(ReferencePipeline.java:526)
	at com.liferay.ide.idea.ui.actions.LiferayActionGroup.update(LiferayActionGroup.java:47)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:136)
	at com.intellij.openapi.actionSystem.impl.Utils.doUpdate(Utils.java:256)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:199)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:225)
	at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:350)
	at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:110)
	at com.intellij.ui.PopupHandler$2.invokePopup(PopupHandler.java:91)
	at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:59)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6548)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
	at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:424)
	at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:58)
	at java.awt.Component.processEvent(Component.java:6313)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4903)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	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)
@Camork
Copy link
Contributor

Camork commented Sep 5, 2018

Hey @simon387, thanks for catching that and I had a pr here.

@gamerson
Copy link
Member

gamerson commented Sep 5, 2018

Fixed in 2ab3682

@dmarks2
Copy link
Contributor

dmarks2 commented Jan 2, 2019

To get notified about crashes in the plugin, you can implement an "errorHandler" in IntelliJ. By this, any developer using the plugin can send crash reports. I've seen implementations which automatically create github issues or Jira issues. Maybe we should implement such an errorHandler in the future. @jtydhr88, @gamerson what do you think?

@jtydhr88
Copy link
Contributor

jtydhr88 commented Jan 2, 2019

I like this idea and I opened the Jira issue for this, see here: https://issues.liferay.com/browse/INTELLIJ-30
but I would not like to do it in next release(1.2.0), we could do it in 1.3.0 or later.

@jtydhr88
Copy link
Contributor

jtydhr88 commented Jan 2, 2019

hey @dmarks2 I'd like to assign this task to some Liferay guys :)

@Seiphon
Copy link
Contributor

Seiphon commented Jan 23, 2019

Hi @dmarks2 , thank you for your suggestion, I will think about that solution you mentioned. Could you please give more information about the "errorHandler" and where I can find the implementations which automatically create github or jira issues. Maybe I can refer that implementation. Thanks a lot.

@dmarks2
Copy link
Contributor

dmarks2 commented Jan 23, 2019

Hey @Seiphon,

I tried to implement an errorHandler in my own plugin. In that case it automatically creates a github issue. Unfortunately you will need an API key for github to do this and you cannot checkin the API key (github will remove it automatically for security reasons).

I followed a sample implementation from another plugin. See discussion and helpful links here:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000406190-Answer-Automatic-error-reporting-to-GitHub-issues

@simonjhy simonjhy reopened this Mar 3, 2022
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

7 participants