简体   繁体   中英

My flutter app uploads file to firebase perfectly on emulator(vpn enabled) but doesn't do so on my android device

I have been working on a Flutter app that uploads a file to Firebase Storage and gets back the download URL for further procedure. It works fine on my Android emulator but while trying to test it on my Android device, it cannot do so.

While trying to upload the file to Firebase through the app from two of my Samsung devices, it showed the following error each time:

I/System.out(15821): (HTTPLog)-Static: Hongbao
I/System.out(15821): (HTTPLog)-Static: isSBSettingEnabled false

I found some probable problems and approaches to solve it on I/System.out: (HTTPLog)-Static: isSBSettingEnabled false? but none of the solutions seemed to work in my case.

To cross check I tried to run it on an Android device from Nokia. It ran once but seems not to be working after I rebuilt the apk after running 'flutter clean', 'flutter packages get' and then 'flutter run'.

It shows an error as follows:

I/System.out( 7968): [okhttp]:check permission begin!
I/System.out( 7968): [okhttp]:not MMS!
I/System.out( 7968): [okhttp]:not Email!
I/System.out( 7968): [socket]:check permission begin!

It is to be noted, the following are the packages I am working with:

sms: ^0.2.0
file_picker: 1.4.2
firebase_storage: ^3.1.5
firebase_core: ^0.4.0+9
http: ^0.12.1

I have the following permissions enabled

<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> 
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.SEND_SMS" />

Edit:

The full error stack for Samsung was https://docs.google.com/document/d/1VhQOKX6EhKHoHi46quTSO6mrmc13Dkvk39mMx7E6V_M/edit?usp=sharing and for the Nokia device was https://docs.google.com/document/d/1Rr0TuREn3o2Wh9nDWCV2Ig9Vi1ihb2LzvgPNhOS50as/edit?usp=sharing

Update:

I have noticed that the API call to Firebase storage is being revoked. I tried using VPN which still shows the errors I mentioned above, but gets my job done. But I want to use the app without having to run a VPN. Can someone please help me with a way around?

The API call to Firebase storage is being revoked. I tried using VPN which still shows the errors I mentioned above, but gets my job done. But I want to use the app without having to run a VPN.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM