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
Android locale changing is broken #19521
Comments
It seems like you have not included the output of |
✅ fastlane environment ✅Stack
System Locale
fastlane files:No Fastfile found No Appfile found fastlane gems
Loaded fastlane plugins:No plugins Loaded Loaded gems
generated on: 2021-10-24 |
This seems to be the line that's causing the failure: fastlane/screengrab/screengrab-lib/src/main/java/tools.fastlane.screengrab/locale/LocaleUtil.java Line 39 in 37a14de
|
Thanks for sharing. I found a lot of interesting information here. mcdvoice survey |
On Emulator running S (31) I'm getting:
|
This issue sounds like it's related to this issue. |
@sgrgrsn I'm not sure I understand. My problem is coming from the Android screengrab lib and not from fastlane itself (which is what your workaround is about) |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
Yes still an issue. |
Can confirm, this is still an issue. |
Same here, running on Android 12. |
Same. |
I guess I should probably fix it 🙃 I'll see if I can figure out what's going on and get a fix out this week |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
Commenting just because this was not fixed :D |
@joshdholtz have you found out what's causing the locale changing to be broken? I've got nothing except my stack trace |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
It's still broken. |
Slightly different stack, but same problem I think. Trying on an API 30 AVD, I get a java.lang.RuntimeException: java.lang.ClassNotFoundException: $Proxy9
[14:28:08]: ▸ at tools.fastlane.screengrab.locale.LocaleUtil.changeDeviceLocaleTo(LocaleUtil.java:52)
[14:28:08]: ▸ at tools.fastlane.screengrab.locale.LocaleTestRule$1.evaluate(LocaleTestRule.java:30)
[14:28:08]: ▸ at androidx.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:134)
[14:28:08]: ▸ at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[14:28:08]: ▸ at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
[14:28:08]: ▸ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
[14:28:08]: ▸ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
[14:28:08]: ▸ at androidx.test.ext.junit.runners.AndroidJUnit4.run(AndroidJUnit4.java:162)
[14:28:08]: ▸ at org.junit.runners.Suite.runChild(Suite.java:128)
[14:28:08]: ▸ at org.junit.runners.Suite.runChild(Suite.java:27)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
[14:28:08]: ▸ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[14:28:08]: ▸ at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
[14:28:08]: ▸ at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
[14:28:08]: ▸ at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
[14:28:08]: ▸ at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56)
[14:28:08]: ▸ at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:444)
[14:28:08]: ▸ at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2205) |
We have the same issue, and after investigating, we found out that this is not a bug of screengrab, but instead it was a conflict with LeakCanary. So check if you are using LeakCanary or check for other libraries that may be doing the same thing. For LeakCanary, the fix is to avoid installing it on test builds, for now, we are doing it by using |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
Still somewhat of an issue. |
@vanniktech There are 2 ways to overcome the problem.
For Android 9 (API level 28)
For Android 10 (API level 29) or higher
The interesting part is this: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
HiddenApiBypass.invoke(
amnClass,
activityManagerNative,
"updateConfiguration",
config
);
} else {
Method updateConfigurationMethod =
amnClass.getMethod("updateConfiguration", Configuration.class);
updateConfigurationMethod.setAccessible(true);
updateConfigurationMethod.invoke(activityManagerNative, config);
} @fastlane-bot |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
Still an issue |
Still an issue 😅 |
Using
fastlane 2.197.0
and Screengrab2.1.1
and when doing so on my device, I'm getting the following exception:I've been trying to isolate this into a reproduction project but wasn't successful to do so. Do you know what the reason behind this could be?
I'm running an 29 emulator with target/compileSdk set to 31 and building with Gradle 7.2 & AGP 7.0.3
The text was updated successfully, but these errors were encountered: