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

No Test Failure Highlighting #1258

Closed
davidmace opened this issue Feb 12, 2016 · 16 comments
Closed

No Test Failure Highlighting #1258

davidmace opened this issue Feb 12, 2016 · 16 comments
Milestone

Comments

@davidmace
Copy link

I'm using Cursive in IntelliJ. When I run tests, I get the following output in the REPL and no highlighting of which test fails.

Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null

Ran 1 tests containing 1 assertions.
1 failures, 0 errors.


My code is as follows:

(ns yoyo
  (:use [clojure.test])
  )

(deftest foo
  (is (= 5 (+ 2 2))))

Thanks :).

@cursive-ide
Copy link
Owner

Could you attach your log (Help-Show log in Finder/Explorer) after reproducing this problem? Also, if you could create a small project showing the problem and put it on Github that would be great.

@laurentsenta
Copy link

I have the same issue, (IntelliJ 15.0.3).

No highlights in the editor and no feedback for errors in the REPL:

Testing my.core
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null

Ran 1 tests containing 6 assertions.
2 failures, 0 errors.

here's the corresponding IJ log line:

2016-03-06 02:42:06,680 [ 486843]  ERROR -             cursive.repl.nrepl - Error handling response
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.findFileByPath (LocalFileSystemBase.java:-1)
    cursive.testing.actions$find_file_and_line.invoke (actions.clj:197)
    cursive.testing.actions/fn (actions.clj:222)
    clojure.lang.MultiFn.invoke (MultiFn.java:229)
    cursive.testing.actions$test_handler$reify__11439.out (actions.clj:285)
    cursive.repl.nrepl$handler.invoke (nrepl.clj:283)
    cursive.repl.nrepl$nrepl_start$fn__3878$fn__3882$fn__3889.invoke (nrepl.clj:331)
    cursive.repl.nrepl$nrepl_start$fn__3878$fn__3882.invoke (nrepl.clj:330)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)

I haven't managed to reproduce the error. A minimal luminus project with a copy of my code and tests does not trigger the error.

Few notable things in my case:

  • I have code in cljc
  • I upgraded my project by:
    1. Move current/ to old/
    2. Create current/ project with last luminus template
    3. Copy code, test by test, from old/* to current/

The issue appeared after I delete old.
Clicking on "errors hypertexts" in the test REPL would redirect to the files of old half of the time.

  • I tried to "Invalidate IntelliJ Cache and Restart", didn't solve the issue.
  • I tried to rename the .iml and .idea then re-create the project in IntelliJ, didn't solve the issue.
  • I just moved to last luminus which uses mount a lot
  • I've seen a bunch of "exception outside a test assertion" before getting these messages.

My issue happens on a single test file, schart.test.core that I created recently (not moved from old).
Copying the code in another test works, or running it in schart.test.omg works.

EDIT: This was a dumb namespace issue, I had
(ns schart.test.schart.core instead of (ns schart.test.core.
How it messes up Cursive REPL is weird.

@katox
Copy link

katox commented Sep 14, 2016

I see these "@NotNull" errors if I add test.check defspec or test.chuck deftests into tested ns.

@dmarjenburgh
Copy link

Possible the same as #1525

@ronaldsuwandi
Copy link

Had the same issue as @lsenta before, turns out it's a dumb namespace error, in I used - in the package directory blah-blah instead of blah_blah. Fixed it by renaming the directory to use underscore

@Jarzka
Copy link

Jarzka commented Jun 6, 2017

Same issue here. Caused by the fact that namespace and directory path did not match.

The error message given by Cursive should be improved.

@alexanderkiel
Copy link

I have still the same problem in 1.6.2-eap2-2017.2:

2017-11-06 16:05:28,386 [ 870557]  ERROR -            #cursive.repl.nrepl - Error handling response
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.findFileByPath (LocalFileSystemBase.java:-1)
    cursive.testing.actions$find_file_and_line.invoke (actions.clj:207)
    cursive.testing.actions/fn (actions.clj:215)
    clojure.lang.MultiFn.invoke (MultiFn.java:229)
    cursive.testing.actions$test_handler$reify__13194.out (actions.clj:289)
    cursive.repl.nrepl$handler.invoke (nrepl.clj:342)
    cursive.repl.nrepl$nrepl_start$fn__3802$fn__3806$fn__3813.invoke (nrepl.clj:403)
    cursive.repl.nrepl$nrepl_start$fn__3802$fn__3806.invoke (nrepl.clj:402)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)

I don't see anything special in my test. Would it be possible to throw a own exception with more details instead of invoking findFileByPath with a null path?

@Procrat
Copy link

Procrat commented Nov 15, 2017

I just upgraded to the latest version of IntelliJ and this error started occurring for me as well. I upgraded Cursive from the latest stable 1.6.1 to 1.6.2-eap2-2017.2, but the problem persists.

2017-11-15 16:31:43,714 [ 295142]  ERROR -            #cursive.repl.nrepl - Error handling nREPL response
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
 at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.findFileByPath (LocalFileSystemBase.java:-1)
    cursive.testing.actions$find_file_and_line.invoke (actions.clj:207)
    cursive.testing.actions/fn (actions.clj:215)
    clojure.lang.MultiFn.invoke (MultiFn.java:229)
    cursive.testing.actions$test_handler$reify__13194.out (actions.clj:289)
    cursive.repl.nrepl$handler.invoke (nrepl.clj:342)
    cursive.repl.nrepl$nrepl_start$fn__3802$fn__3806$fn__3813.invoke (nrepl.clj:403)
    cursive.repl.nrepl$nrepl_start$fn__3802$fn__3806.invoke (nrepl.clj:402)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)

@Procrat
Copy link

Procrat commented Dec 5, 2017

I just upgraded again to the latest versions of IntelliJ and Cursive EAP and this problem no longer occurs! I'm not sure whether this was by accident or intentional, but thank you anyway!

@hannahhenderson
Copy link

I had the same error message, and eventually realized my Cursive license was expired, so I wasn't getting updates.

@conan
Copy link

conan commented Apr 16, 2018

I also have this problem:

Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null

I'm on the latest Cursive and Intellij. The test runs and prints the correct output (e.g. Ran 1 test containing 2 assertions. 1 failure 0 errors), but as the highlighting fails there is no way to find out which test failed.

Cursive 1.7.0-eap2-2017.2
idea.log

@conan
Copy link

conan commented Apr 27, 2018

Is there any way we can re-open this issue or should I start a new one?

@gphilipp
Copy link

I do have that same message too...

@cursive-ide
Copy link
Owner

@conan Sorry, I've been travelling this week and haven't had a chance to look at this. I think opening a new issue linking to this one is probably the best thing to do since I suspect this is a new issue - the previous one was definitely fixed.

@christinning
Copy link

christinning commented May 26, 2018

Sorry, I can't see any new issue regarding this.

I'm seeing the same thing only when I add a clojure.test.check.clojure-test defspec to my test. Test results are reported correctly.

Intellij 2017.3,
Cursive 1.6.3-2017.3

{:result true, :num-tests 1000, :seed 1527346948322, :test-var "test-name"}
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null

Ran 3 tests containing 4 assertions.
0 failures, 0 errors.

@Vinai
Copy link

Vinai commented Jan 5, 2020

Still happening with 1.9.1-eap1-2019.1

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