3

I am unable to run the app on a physical device (Xiaomi) after upgrading the flutter SDK to the latest version. It is working fine on downgrading the flutter and few packages.

OS: Ubuntu 18.04.5 LTS

The error details are in the below image. I have also tried to install the apk via the command line which is also not working

$ adb install app.apk
adb: failed to open app.apk: Operation not permitted

Tried adb kill-server, gave full permission to the folder, etc. Nothing worked.

I am able to debug the sample flutter app on my physical device/genymotion emulator. it will start throwing the above error if I add the packages like cloud_firestore, amplify, flutetrtoast, etc.

One more thing I have noticed is I can debug up to a particular version of the package. for example, It is working fine for the package fluttertoast till the version 6.0.1.

More logs are available in this GitHub issue

Please help.

The error details are in the below image

Shyju M
  • 9,387
  • 4
  • 43
  • 48
  • 1
    I'm curious about the "Content Thread Blocked" modal at the top. Do you know if that was produced by the editor, or by adb, or something else? And do you know what the string "txt/x-sql" in "secure_context.proto" is about that it doesn't like? – catleeball Dec 26 '20 at 05:36
  • @catleeball I am not sure why this is happening. Newly created flutter projects are working fine until I add the firestore plugin. – Shyju M Dec 26 '20 at 05:41
  • Have you tried removing the app from your device and then re-install it? I faced a similar (not identical) issue recently and this solved the problem. – hman_codes Jun 03 '21 at 15:45
  • It's almost certainly related to that pop-up, which seems to be a security/virus scanner of some kind. Take a look and see if any such thing is installed on your computer. – msbit Jun 05 '21 at 00:17
  • This doesn't seem to be an issue with flutter itself but rather your computer settings as indicated by the error pop up – ByteMe Jun 06 '21 at 14:18
  • Hey, did you fix this? I'm running into a similar issue – Mohit Singh Aug 17 '22 at 07:31
  • Couldn't fix, working fine in my new laptop @MohitSingh – Shyju M Dec 20 '22 at 10:26

4 Answers4

1

Looks like a permission error to me. Run flutter clean and then open your editor as an administrator.

Vitor Freitas
  • 103
  • 1
  • 11
1

The issue is in your phone settings, you need to enable in your Developer options "Install via USB".

Krishan Madushanka
  • 319
  • 1
  • 5
  • 21
  • It's enabled and working fine for the newly created app. it is throwing error only after adding the packages like flutter fire, amplify, etc – Shyju M Jun 05 '21 at 18:02
0

Although my gut is telling me that it is Android (especially if it is version 10), I have to go with my eyes here. That message is from a firewall that was tripped on the PC end. It says as much.

That said just to be sure, also make sure that you have enabled the option for "accept files from unknown sources" in the device settings as well (either in security or developer options). It could just be a really poorly worded alert.

Nate T
  • 727
  • 5
  • 21
  • Thanks for your response. The newly created flutter app and old version of the same is working fine. It starts throwing the error only with the latest version of the flutter with the latest packages. – Shyju M Jun 07 '21 at 10:19
  • With Android, it could be any little random thing that is different about that app. Have you checked the SO search yet to see if anyone else has had issues sideloading apps with the updated Flutter libraries? If there are, you've solved it. If not, it is most likely something else. That is one of SO's best features, imo. If a major bug like that gets released with an update, you can guarantee that within a few hours ther will be ten different questions related to it (and at least three will be duplicates XD.) One of the Lombok developers even uses it as a bug tracker (which is a genius idea!) – Nate T Jun 07 '21 at 22:22
-1

Looks like some package has an issue with Redmi Note 7S. For example: fluttertoast => make sure you use the compatible version

  • It is throwing the same exception even in the emulator. I tried multiple phones as well. I gave an example package as fluttertoast, this is happening for most of the packages like amplify, flutterfire packages, etc – Shyju M Jun 02 '21 at 14:05