sfcc-studio
sfcc-studio copied to clipboard
NullPointerException while uploading cartridges
Problem
Hi when I try to upload my cartridge to my sandbox I get this error:
java.lang.NullPointerException
at com.binarysushi.studio.actions.UploadCartridgeAction.actionPerformed(UploadCartridgeAction.kt:49)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:244)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:244)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$performAction$0(ActionMenuItem.java:277)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:236)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:67)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.performAction(ActionMenuItem.java:269)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$2(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:541)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:571)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at java.desktop/java.awt.Component.processEvent(Component.java:6419)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
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:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
And I also noticed that debug mode does not hit any breakpoints.
System Info
Windows 11 22000.469
Webstorm 2021.3.1 Build #WS-213.6461.79
node 10.24.0
Cartridges paths:
Plugin settings (already tested on VSCode, so I assume they are correct):
@S0NN1 did you leave out your hostname, username, and version on purpose for the screenshot?
@nek4life yes because they are company info and I cannot share them, but I know for sure they are correct :) If you need further info:
- hostname ends with
demandware.net
- username: company account
@S0NN1 ok just checking. You can use the context menu item for upload cartridge if you are in the project file tree and right click on a cartridge root. There is a bug where the upload cartridge command shows up in other context and it shouldn't. Could you try this to see if it uploads your one cartridge? Otherwise you can use clean cartridges which will delete all the cartridges on the remote server and upload all cartridges in your settings.
@nek4life ok so if I use Upload Cartridges
in the context menu when selecting directories, it works.
I was using the one under Tools>Commerce Cloud>Upload Cartridges
which I presume wasn't intentional.
Debug now works too for some reason.
Thank You!
@S0NN1 The one under Tools>Commerce Cloud>Upload Cartridges shouldn't display there. It is a bug. I'll have to look into it. Clean cartridges works everywhere. If I remember correctly you might even be able to highlight more than one cartridge and upload from the context menu when selecting directories as well. Been a while since I looked at the code there.
Hi Charilie, I also faced same issue while uploading cartrigdes from Tools>Commerce Cloud>Upload Cartridges. Please fix this issue.
@kshverma Please use the context menu on the directory in the project window to upload individual cartridges until this is fixed. Upload Cartridge is to upload a single cartridge. Clean cartridges cleans and uploads all of them.
Thank you Charilie!