Open phanil opened 2 months ago
I think we may be experiencing this issue as well. It doesn't happen on iOS, but causes issues for a select few android devices. It is consistently happening for the Pixel6a, Pixel 7 and Pixel 9 running Android version 14
This issue occur on Techno Devices
Use less Until run on all devices
same issue
When it to be fix ?
This is happening to me as well ... Please solve this compatibility issue
@phanil can you give more details?
@ufukhawk When using safe_device
package along with geolocator
package. The App installs correctly, but at the moment of building the UI, it gets stuck and then the console shows this message: " The application may be doing too much work on its main thread." After that, the app die.
This doesnt happen on IOS devices.
hmm, i will check this.
Thanks, let me know if you need more evidence
same issue here.
How did you understand that the problem was with the safe_device ? Can I get an error message?
try again : safe_device: ^1.1.9
I just tried 1.1.9 version. The app starts well the first time you install it. But once you have it installed and run again, is when the delay happens..
These are the logs
D/FlutterGeolocator( 5896): Attaching Geolocator to activity
D/FlutterGeolocator( 5896): Creating service.
D/FlutterGeolocator( 5896): Binding to location service.
D/FlutterGeolocator( 5896): Geolocator foreground service connected
D/FlutterGeolocator( 5896): Initializing Geolocator services
D/FlutterGeolocator( 5896): Flutter engine connected. Connected engine count 1
I/FLTFireBGExecutor( 5896): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling]
D/FLTFireContextHolder( 5896): received application context.
D/FlutterGeolocator( 5896): Geolocator foreground service connected
D/FlutterGeolocator( 5896): Initializing Geolocator services
D/FlutterGeolocator( 5896): Flutter engine connected. Connected engine count 2
I/Choreographer( 5896): Skipped 1799 frames! The application may be doing too much work on its main thread.
Is not that the app doesnt start, but it takes literally like 1 minute to fully render the First screen. And I get the message to "wait" or "close app" on the screen.
I know this problem is caused by safe_device and geolocator packages, because when I replace safe_device for another jailbreaker detection package, it works perfectly.
I still wanted to use this package (safe_device) because is definitely more precise than the others that i found
I just tried 1.1.9 version. The app starts well the first time you install it. But once you have it installed and run again, is when the delay happens..
These are the logs
D/FlutterGeolocator( 5896): Attaching Geolocator to activity D/FlutterGeolocator( 5896): Creating service. D/FlutterGeolocator( 5896): Binding to location service. D/FlutterGeolocator( 5896): Geolocator foreground service connected D/FlutterGeolocator( 5896): Initializing Geolocator services D/FlutterGeolocator( 5896): Flutter engine connected. Connected engine count 1 I/FLTFireBGExecutor( 5896): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling] D/FLTFireContextHolder( 5896): received application context. D/FlutterGeolocator( 5896): Geolocator foreground service connected D/FlutterGeolocator( 5896): Initializing Geolocator services D/FlutterGeolocator( 5896): Flutter engine connected. Connected engine count 2 I/Choreographer( 5896): Skipped 1799 frames! The application may be doing too much work on its main thread.
Is not that the app doesnt start, but it takes literally like 1 minute to fully render the First screen. And I get the message to "wait" or "close app" on the screen.
I know this problem is caused by safe_device and geolocator packages, because when I replace safe_device for another jailbreaker detection package, it works perfectly.
I still wanted to use this package (safe_device) because is definitely more precise than the others that i found
Same issue here.
Any update
same issue, if we disable to location permission, the issue is not re producible and working smoothly. Any help on it?
I also face this issue. Any suggestions for resolving it?
I think the issue has to do with this bit of code inside the MockLocation.LocationAssistant.acquireLocation
lines 456-466. I'm not even doing checks against location (just doing emulator checks) yet this code still runs on start up. Downgrading to 1.1.4
before this class is introduced fixes the issue though you will lose the other upgrades.
if (!updatesRequested) {
requestLocationUpdates();
// Check back in a few
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
acquireLocation();
}
}, 10000);
return;
}
I solved my problem using the following code: final bool isMockLocation = (await Geolocator.getCurrentPosition()).isMocked;
In my case, remove safe_device works.
I am also getting this:
I/Choreographer( 8160): Skipped 718 frames! The application may be doing too much work on its main thread.
Strangely, the first time it worked, but after restarting app, it hangs for along time. Maybe that is because app was already running.
I tried moving it high up in main(), well before my "Geolocator foreground service connected" print, and no change when starting app fresh in debug mode.
AFTER the app has started, there is no hanging on hot reload.
Did a clean and rebuild, then ran in debug mode again, same hanging result. It always hangs on when my debug prints "Requesting location permission".
When used with geolocator, the UI will not respond when the app is started.