question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tinker Plugin shows empty Output and raises Exception

See original GitHub issue

Bug description Tinker Plugin does not work inside Phpstorm but in Terminal it does. It seems to be related with TinkerOutputToolwindow.updateView() is not able to fallback to an default value when LABEL.defaultAttributes.foregroundColor is null

To Reproduce

  1. open Tinker Console for laravel 8.0 project

  2. add code:

    <?PHP
    //Tinker away!
    echo 'hello world';
    
  3. run code (with Smart Action or Run Console)

  4. Tinker Output is empty & Exception is thrown:

    java.lang.NullPointerException: LABEL.defaultAttributes.foregroundColor must not be null at nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolwindow.updateView(TinkerOutputToolwindow.kt:86) at nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolwindow.resetOutput(TinkerOutputToolwindow.kt:58) at nl.deschepers.laraveltinker.util.PhpArtisanTinkerUtil.run(PhpArtisanTinkerUtil.kt:118) at nl.deschepers.laraveltinker.util.TinkerConsoleUtil.runTinkerWithFile(TinkerConsoleUtil.kt:36) at nl.deschepers.laraveltinker.action.SmartAction.actionPerformed(SmartAction.kt:58) at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:563) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$8(IdeKeyEventDispatcher.java:677) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:261) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:670) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:603) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:574) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:457) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:450) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:218) at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:798) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:748) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:441) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:825) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:440) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:794) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492) 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)

Expected behavior ‘hello world’ should be echoed to Tinker’s Console

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • IDE & Version: PhpStorm 2021.2.3 Build #PS-212.5457.49, built on October 13, 2021

    Runtime version: 11.0.12+7-b1504.40 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.7 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 16 Registry: run.processes.with.pty=TRUE, ide.balloon.shadow.size=0 Non-Bundled Plugins: com.github.leomillon.uuidgenerator (4.5.1), Key Promoter X (2021.3), com.myoutdesk.tailwind_formatter (1.4.2), String Manipulation (8.20.203.000.1), com.intellij.ideolog (203.0.27.0), com.microsoft.vso.idea (1.162.0), com.karateca.jstoolbox (1.10), com.bum.intellij.tailwindcss (2.0.2), com.vladsch.idea.multimarkdown (3.0.202.112), com.sonnk.iterm (0.0.8), org.intellij.plugins.postcss (212.5457.18), HtmlEntity (1.1), com.xiaobing1024.laravel (1.1.1), com.dmarcotte.handlebars (212.5457.62), nl.deschepers.laraveltinker (2.3.0), com.github.shiraji.yaemoji (1.0.7), org.endpointdeps.EndpointDependencies (1.3), de.espend.idea.laravel (0.15.4), com.kalessil.phpStorm.phpInspectionsEA (4.0.6.4), ru.adelf.idea.dotenv (2021.3.0.212), de.espend.idea.php.annotation (8.0.0), fr.adrienbrault.idea.symfony2plugin (0.23.212), com.jetbrains.plugins.jade (212.5080.8), intellij.prettierJS (212.5080.8), tv.twelvetone.intellij.plugins.intellivue (1.1.8)

  • PHP Version: 7.4.24 && 8.0.11

  • OS: macOS 10.15.7

  • Laravel Tinker plugin version : 2.3.0

  • Interpreter Type: Local

  • Laravel Version: v8.54.0 && v8.63.0

  • Tinker version: v2.6.1 && v2.6.2

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Roboroadscommented, Nov 3, 2021

Fixed in the next release ^^

2reactions
Roboroadscommented, Nov 2, 2021

I indeed changed this because I removed a title from the screen where I picked the color from. I’ll fix this today 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoSuchElementException thrown while Testing Maven Plugin
void testStuff() throws Exception { File testPom = new File(getBasedir() ... No build steps output, no log output, not even in the created...
Read more >
VSTHost - Hermann Seibs Hauptseite
Whenever an ASIO driver is selected in the Output Port box, the Input. Port box is grayed out to reflect the fact that...
Read more >
tinker-openmm/library.rst at master - GitHub
OpenMM is based on a layered architecture, as shown in the following diagram: ... If anything goes wrong, OpenMM throws an exception.
Read more >
Provider Documentation - Apache TinkerPop
Apache TinkerPop™ exposes a set of interfaces, protocols, and tests that make it possible for third-parties to build libraries and systems ...
Read more >
Returning null or a empty value/throw exception? [duplicate]
It should return a valid item, or raise an exception, or assert. Callers should never check the return result, because it will always...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found