Comments (5)
Hello @saurabhkumar8112, going through the native code, we are not setting a custom redownload or path compared to the native libraries. I cannot find any specific documentation about models being redownloaded manually. When you mention app upgrade, does it mean that you are only updating dart code, or native libraries as well? My guess is that changing the firebase_core
could impact how the hash is calculated.
from flutterfire.
Thanks for your reply @Lyokone
By app upgrade I meant, upgrading to a new version available on play-store/app-store.
We use upgrader to ask users to upgrade the app when a new version is available.
My guess is that changing the firebase_core could impact how the hash is calculated
I think hash is not a problem here. As long as the model file is same, MD5 should return the same hash. My speculation is the local file path
which is used to check whether there's already an available model might be different or the logic could be flawed.
This is how the path to model looks like on a device
/data/user/0/app_id/no_backup/com.google.firebase.ml.custom.models/some_hash/model_name/**id**
This can be retrieved by printing model.path
The id
parameter is an integer.
What made me believe that model is getting downloaded multiple times after each app upgrade is, after app upgrade theid
parameter increases by 1 even though its the same model on remote.
Which is not the expected behaviour. The mode should only be re-download when model updates on remote.
Even looking at the native code, I couldn't see a condition where the plugin checks for already installed models, compares hash and then only proceeds.
from flutterfire.
When referring to the native code, we are only bridging using the native android and iOS SDK.
I had a look at the native code for Android and couldn't find any condition that would force to redownload the model: https://github.com/firebase/firebase-android-sdk/blob/master/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java
You can probably open an issue on this repository to see if the native team has an idea about what could be happening: https://github.com/firebase/firebase-android-sdk
from flutterfire.
Hey @saurabhkumar8112. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
from flutterfire.
Since there haven't been any recent updates here, I am going to close this issue.
@saurabhkumar8112 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
from flutterfire.
Related Issues (20)
- storage: file storage with dynamic directory not visible in gcsfuse HOT 3
- [📚] Your documentation feedback title (CHANGE ME)
- cloud_firestore: iOS includeMetadataChanges does not recieve isFromCache false after first run HOT 14
- [firebase_auth]: [firebase_auth/unknown-error] An internal error has occurred. (when calling signinwithemailandpassword on windows) HOT 10
- [FileSystemEntity]: <Is it a bug? I can't read json file via File.readAsStringSync or File.readAsString> HOT 1
- [firebase_auth]: <Requests from this Android client application <empty> are blocked.> HOT 2
- FirebaseAuth.instance.currentUser always null on windows app flutter !! HOT 3
- Firebase Auth: reCaptcha shows up even after configuring Silent APN correctly HOT 2
- Google SignIn Crashing on iOS
- [firebase_core]: not working with cocoapods 1.15.2 HOT 8
- [BUG]: Error: Unable to get Xcode project information ... Unable to read project 'Runner.xcodeproj'. After Running Flutterfire Configure on MACOS HOT 1
- [firebase_messaging]: iOS Background receive Message HOT 2
- [firebase_core]: 'pod update' cannot be done when 'firebase core' is updated to the latest version HOT 5
- Lost connection to device in desktop flutter app Firebase Storage ! HOT 3
- [remote_config]: setConfigSettings on windows raises an exception HOT 1
- Problem with GoogleUtilities after Declaring :linkage => :static in Podfile HOT 3
- [📚] Your documentation feedback title (CHANGE ME)
- [Firebase auth]: about:blank page firebase auth verifyPhoneNumber HOT 3
- [firebaseAnalytics]: logScreenView doesn't send the name and class to GA4 in flutter web HOT 17
- [firestore]: Firestore snapshot does return empty data for existing doc HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterfire.