Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

IllegalStateException: File name too long when compiling unit tests #247

Closed
mcomella opened this issue Feb 21, 2019 · 9 comments
Closed
Labels
chore good first issue Good for newcomers help wanted Extra attention is needed P3 Low impact and frequency size S

Comments

@mcomella
Copy link
Contributor

mcomella commented Feb 21, 2019

Steps to reproduce

  • Run assembleamazonwebviewdebugunittest

Expected behavior

Successful compile.

Actual behavior

e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Cause: /home/mcomella/dev/moz/firefox-echo-show/app/build/tmp/kotlin-classes/amazonWebviewDebugUnitTest/org/mozilla/focus/ext/LiveDataPostIfNewTest$GIVEN old value was posted AND a different value was posted WHEN the original value is posted again THEN three total values should have been emitted$1.class (File name too long)
File being compiled at position: file:///home/mcomella/dev/moz/firefox-echo-show/app/src/test/java/org/mozilla/focus/ext/LiveDataPostIfNewTest.kt
The root cause was thrown at: FileOutputStream.java:-2

It looks like we're unable to save the class file because the name of the generated class (from the lambda?) is too long.

Device information

  • Echo Show device (1st gen? 2nd?): N/A
  • Latest affected Firefox version: up/master
  • Earliest affected Firefoxx version: releases/v1.3

I'm running ubuntu 18.04 on ext4: I'm guessing APFS (or whatever) on macOS has a longer file name limit (ext4 seems to be 255 bytes; APFS is 255 UTF-8 characters).

@mcomella mcomella changed the title File name too long when compiling unit tests IllegalStateException: File name too long when compiling unit tests Feb 21, 2019
@devinreams devinreams added bug Something isn't working good first issue Good for newcomers P5 UNUSED - Consider to replace with P3 and removed bug Something isn't working labels Feb 27, 2019
@mcomella
Copy link
Contributor Author

Action item: probably just shorten the test name.

@devinreams devinreams added chore P3 Low impact and frequency help wanted Extra attention is needed and removed P5 UNUSED - Consider to replace with P3 labels Mar 6, 2019
@kartikgits
Copy link

I'm a beginner and would like to work on it.

@mcomella
Copy link
Contributor Author

Hello @kartikgits ! Feel free to get started. First, get the project set up with Android Studio. Then try to follow the steps to reproduce above: run ./gradlew assembleamazonwebviewdebugunittest from the command line. If you're able to reproduce, great! If not, you can make our suggested speculative fix: just shorten the test name (the one on line 2 of the error message above) but still try to keep it meaningful.

If you have questions, please @ mention me and let me know.

@unicorn-io
Copy link

By any chance is this issue solved? If no, I am a beginner can I contribute to it?

@mcomella
Copy link
Contributor Author

mcomella commented May 6, 2019

@unicorn-io I don't believe it's solved: the test still exists in the code base. However, I don't have my ubuntu machine right now to test for sure. If you want to take this bug, feel free!

@unicorn-io
Copy link

I'll take it then😊

@unicorn-io
Copy link

@mcomella I'm not able to reproduce it, can you help me with this!

@mcomella
Copy link
Contributor Author

@unicorn-io If you can't reproduce, unfortunately, I think it's going to be hard to fix this one – sorry about that!

Maybe you'd like to try to address mozilla-mobile/firefox-tv#1247 on Firefox for Fire TV? I think it's a good starter issue. btw, you can find us on IRC in the #focus channel during PT working hours (~9am - 5pm, Monday - Friday): feel free to ask for help there for faster communication!

@mcomella
Copy link
Contributor Author

See mozilla-mobile/firefox-tv#1868 – this was a problem with my environment, specifically my file system encryption.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore good first issue Good for newcomers help wanted Extra attention is needed P3 Low impact and frequency size S
Projects
None yet
Development

No branches or pull requests

4 participants