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

fix: some problems #1696

Closed
imeDevelopers opened this issue Feb 3, 2024 · 5 comments
Closed

fix: some problems #1696

imeDevelopers opened this issue Feb 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@imeDevelopers
Copy link

WHY don't we use our flutter files instead of your flutter?! (you force us to have two versions of flutter files in our environment.., this is not good), here's one of the reasons:
we use: flutter update-packages --force-upgrade

and when we build the app using the shorebird we get errors like, for example: our app pub packages can not be resolved! , etc ..
so we can't build the app ..

we HAVE TO use: "flutter update-packages --force-upgrade" in your flutter files to solve this problem ..

and here's another problem:

Would you like to continue? (y/N) Yes
✓ Updating release status (0.2s)
Unhandled exception:
PathNotFoundException: Cannot open file, path = 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\out\lib\arm64-v8a\libapp.so' (OS Error: The system cannot find the path specified. , errno = 3)

NOT exists: 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\out\lib\arm64-v8a\libapp.so'

exists: 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\stripReleaseDebugSymbols\out\lib\arm64-v8a\libapp.so'

ALSO: why don't you let us build our APK/appbundle/etc.. files and simple give the shorebird the path to this file then you simply upload it and update the from it?!!

If I remember any other problem I will tell you, thx.

@imeDevelopers imeDevelopers added the bug Something isn't working label Feb 3, 2024
@eseidel
Copy link
Contributor

eseidel commented Feb 3, 2024

Thanks for the report.

We have to use our own Flutter in order to replace the libflutter.so built inside the application with one that knows how to do updates.
https://docs.shorebird.dev/architecture#a-modified-flutter discusses the details.

I've never used --force-upgrade before. I don't think we call pub anywhere during shorebird release so I would not expect it to try and change your dependencies in anyway. Are you able to share the dependencies: section of your pubspec.yaml? I'm happy to look and see if there is some other way to get the desired result.

PathNotFoundException: Cannot open file, path = 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\out\lib\arm64-v8a\libapp.so' (OS Error: The system cannot find the path specified. , errno = 3)

Looks like maybe the build failed earlier and then we can't find the file in the place it is expected? When you build with flutter normally where do the files end up? Are they in C:\flutter_app\build\?

@imeDevelopers
Copy link
Author

here's another problem:
✓ Fetching releases (0.5s)
Which release would you like to preview?
Which release would you like to preview? 1.1.1.1+1111
✓ Using production track (1.8s)
✓ Extracting metadata (0.7s)
✓ Building apks (5.6s)
✓ Installing apks (33.3s)
✗ Exception: Unable to clear app data: Security exception: PID 7149 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.example.app

java.lang.SecurityException: PID 7149 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.example.app
at com.android.server.am.ActivityManagerService.clearApplicationUserData(ActivityManagerService.java:4538)
at com.android.server.pm.PackageManagerShellCommand.runClear(PackageManagerShellCommand.java:1852)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:216)
at android.os.ShellCommand.exec(ShellCommand.java:104)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24260)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5118)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4883)
at com.android.server.pm.OppoPackageManagerService.onTransact(OppoPackageManagerService.java:91)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)

@eseidel
Copy link
Contributor

eseidel commented Feb 3, 2024

It looks like some phones disable that permission for adb 🤷 We can remove the reset option on preview if needed for some phones: appium/appium#11949
https://stackoverflow.com/questions/24755341/unable-to-get-android-permission-clear-app-user-data

You can work around it by uninstalling the app first.

@eseidel
Copy link
Contributor

eseidel commented Mar 29, 2024

Regarding this issue: ```
Would you like to continue? (y/N) Yes
✓ Updating release status (0.2s)
Unhandled exception:
PathNotFoundException: Cannot open file, path = 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\out\lib\arm64-v8a\libapp.so' (OS Error: The system cannot find the path specified. , errno = 3)

NOT exists: 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\out\lib\arm64-v8a\libapp.so'

exists: 'C:\flutter_app\build\app\intermediates\stripped_native_libs\release\stripReleaseDebugSymbols\out\lib\arm64-v8a\libapp.so'

I believe @bryanoltman fixed this recently?

@eseidel
Copy link
Contributor

eseidel commented Mar 29, 2024

It's easiest for us to solve issues when each issue contains only one problem.

In this case I see 3 complaints:

  1. Would prefer not to have to have both Shorebird flutter and stock flutter. We will eventually fix this by only having Shorebird Flutter I suspect.
  2. Have an issue with finding libapp.so (this was a gradle plugin issue with the latest Android Studio which I believe @bryanoltman fixed recently.
  3. Had a CLEAR_APP_USER_DATA permission error from adb. I've broken this out into fix: shorebird preview fails with CLEAR_APP_USER_DATA permission error on some phones #1839.

@eseidel eseidel closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants