-
Notifications
You must be signed in to change notification settings - Fork 214
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
recordPaparazzi on Java 17 - UninitializedPropertyAccessException lateinit property sessionParamsBuilder #1031
Comments
We have are integrated a paparazzi to our project and it works well for majority, but several of my colleagues have the same issue @mshearer123 Did you manage to solve it? Maybe some workaround? Additional information:
|
@oleksandrbalan-etn I'm afraid not, we're still stuck. Haven't been able to reproduce in a sample project. |
We have a similar situation. I was digging a little bit into it the other day and I found something pretty weird; we all have apple silicon macs, and while checking all the logs I realised the library is trying to load layoutlib in a path that is for x86 intel macs. I debugged, and found out that it indeed considers my system as an intel macbook. I have no idea what's happening to be honest since the logic there seems to be pretty straightforward, but may be worth looking into.
It's looking for the library in this path:
while I have it in:
It's not happening for everyone, but all of my teammates in our vertical are facing the same error. |
Okay, so I fixed this issue for our case, here is what I found and how I fixed it at last: TLDR; Your Android Studio is probably running the tests on JRE 11. Make sure your JDK 17 is aarch64 native and reinstall Android Studio completely. TL; As you probably know Next, I made sure I have the right version of java with the right architecture, to become 100% visually sure, I downloaded a Java 17 JDK from here for aarch64 and installed it. updated my JAVA_HOME and everything, and made sure my project in Android Studio is also using the correct JDK. Re-ran the test and still I was getting But this was when I realised Android Studio is running my tests [miraculously] on JRE 11. Since all previous "invalidate cache and restart" attempts did not have a positive result, this time I just uninstalled and reinstalled Android Studio and finally after that it was working as it should have. It is a rare corner case indeed, but to determine the actual os and architecture, one shouldn't rely on Java, it's better to do it natively. My only suggestion for the Paparazzi team is that either provide a way for us to configure the system ourselves, or to move that piece of logic to native instead of Java. |
nice work @rahnamaMo i've tried following what you have said, same result. if you don't mind could you let me know what version of paparazzi, compile sdk, gradle etc you are using? |
@mshearer123 sure thing:
|
I can confirm what @rahnamaMo found about x86 architecture, that was really helpful, thx 🤗 Deleting all x86 JDKs and leaving only arm64 ones did the trick in our case. |
@oleksandrbalan-etn that's amazing news 🥳 So glad I could help. |
Same, once all other JDKS were removed. thanks @rahnamaMo @oleksandrbalan-etn |
I am facing the same issue. - name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
architecture: ''
overwrite-settings: false
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run screenshot tests
id: run-screenshot-tests
run: ./gradlew verifyPaparazziDebug But it fails with the same error |
use /usr/bin/arch to detect what architecture we are actually running on instead of what arch the jre was built for. This fixes the case of using an intel version of the jvm on arm. Fixes cashapp#1031
use /usr/bin/arch to detect what architecture we are actually running on instead of what arch the jre was built for. This fixes the case of using an intel version of the jvm on arm. Fixes cashapp#1031
Since, I am using MAC with Apple chip. |
Closing as wontfix, since this is a user environment issue, and there's a suitable workaround (thanks @rahnamaMo!) |
Description
Error when running paparazzi record since updating to gradle 8 / Java 17
have added toolchains workaround
Steps to Reproduce
Unable to reproduce in sample project, but will keep trying over the next few nights.
Expected behavior
Expect to be able to run record tasks as before.
Additional information:
Note: Problem doesn't appear on our CI builds, on Linux
The text was updated successfully, but these errors were encountered: