Comments (13)
287 isn’t in public nuget yet. Please wait for public releases before filing defects on it. I only work on master so I don’t always have things in order yet
from shiny.
Your NRE is happening during the geofence process. Is it coming from your delegate code perhaps?
- I'm actually going to move this to an individual call instead of an array.
- based on 1, this won't matter
- This is by design. StartupTasks must all pass (unless the author of the task doesn't need them to) as it was designed for wiring up infrastructure. If they fail, they should crash otherwise you can start seeing missing behavior in your app potentially.
from shiny.
I'm going to consider this closed case for now. Anything related can be a separate issue at this point.
from shiny.
I only work on dev I meant. So things keep pushing to myget
from shiny.
I couldn't reproduce this. By crash, are you meaning it is showing up in the logging in the sample?
from shiny.
I haven't seen it yet in the Sample (not certain what Shiny build it's using - that would be a neat addition to the Environment screen), but it has now happened twice in the real app I'm close to releasing.
I do want to correct myself: it's being tracked as an error, not a crash, presumably here:
shiny/src/Shiny.Locations/Platforms/Android/GeofenceManagerImpl.cs
Lines 47 to 56 in cfdb474
A few comments on that log call in particular:
- What if each
region.Create()
had its owntry
/catch
to include region details with the exception? AggregateException
being a generally unhelpful wrapper around the actual error(s), I wonder about having the Shiny Logging infrastructure check forAggregateException
and log theInnerExceptions
directly.- Thoughts on having the infrastructure that calls
IShinyStartupTask.Start()
handle the generaltry
/catch
, rather than individual tasks needing to do it?
I need to check with the guy testing the app, but this error may be due to attempting to recreate the geofence after revoking permission for Locations.
from shiny.
- What if each
region.Create()
had its owntry
/catch
to include region details with the exception?
Took a shot at this: #40. I believe this will avoid this particular AggregateException
as well.
from shiny.
I need to check with the guy testing the app, but this error may be due to attempting to recreate the geofence after revoking permission for Locations.
I can't rule out permissions, but I thought I'd mention I have a separate crash report specifically related to permissions:
android.os.Parcel.createException
Parcel.java, line 1950
java.lang.SecurityException: Geofence usage requires ACCESS_FINE_LOCATION permissionandroid.os.Parcel.createException Parcel.java:1950
android.os.Parcel.readException Parcel.java:1918
android.os.Parcel.readException Parcel.java:1868
com.google.android.gms.internal.zzeb.zzb
com.google.android.gms.internal.zzbzl.zza
com.google.android.gms.internal.zzbzu.zza
com.google.android.gms.internal.zzbzc.zza
com.google.android.gms.common.api.internal.zzm.zzb
com.google.android.gms.common.api.internal.zzc.zza
com.google.android.gms.common.api.internal.zzbr.zzb
com.google.android.gms.common.api.internal.zzbr.zza
com.google.android.gms.common.api.internal.zzbp.handleMessage
android.os.Handler.dispatchMessage Handler.java:102
android.os.Looper.loop Looper.java:193
android.os.HandlerThread.run HandlerThread.java:65
I'd be curious to read your thoughts on the "Shiny way" to handle this, pre-create and if permissions are lost after the geofence is originally added to Shiny's repository.
Your NRE is happening during the geofence process. Is it coming from your delegate code perhaps?
I'd expect my code to appear in a stack trace if it were, but I doubt it:
private class GeofenceDelegate : IGeofenceDelegate
{
public async Task OnStatusChanged(GeofenceState newStatus, GeofenceRegion region)
{
Analytics.TrackEvent("Geofence Change", new Dictionary<string, string>
{
{ "id", region?.Identifier },
{ "center", region?.Center?.ToString() },
{ "radius", region?.Radius?.ToString() },
{ "status", newStatus.ToString() },
});
switch (newStatus)
{
case GeofenceState.Entered:
await Api.Post.GeofenceTrigger(region.Identifier, true);
break;
case GeofenceState.Exited:
await Api.Post.GeofenceTrigger(region.Identifier, false);
break;
}
}
}
from shiny.
Your NRE is happening during the geofence process.
I was looking for where it might have been logged. You're thinking it's in here:
via
shiny/src/Shiny.Core/Platforms/Android/Dispatcher.cs
Lines 11 to 21 in cfd1ed4
Odd that the error was reported as GeofenceManagerImpl.Process(Intent)
.
from shiny.
Odd that the error was reported as GeofenceManagerImpl.Process(Intent).
The code of where Process was happening has moved in dev which is why you aren't seeing it relating to your error.
I'd be curious to read your thoughts on the "Shiny way" to handle this, pre-create and if permissions are lost after the geofence is originally added to Shiny's repository.
The permissions error makes sense and there isn't much I can do about that. This is the reason I try to blindly restore the geofences on boot. If permission has been pulled, you'll likely want to do check when your app is in the foreground. I could downgrade the log to an event instead of an error. May even add a category specifically around this type of issue
I'd expect my code to appear in a stack trace if it were, but I doubt it:
I'm still not seeing where the NRE could be. Is there more to the stack trace in your appcenter log?
from shiny.
I'd expect my code to appear in a stack trace if it were, but I doubt it:
I'm still not seeing where the NRE could be. Is there more to the stack trace in your appcenter log?
There is not. Not sure if that's due to AggregateException or how Dispatcher Task handling works or something else. I can bump to the latest beta to see if this persists.
Beyond #40, which now seems unlikely to be related to what I am seeing, I am not sure how to get a better trace on my actual error. 🤔
I did try revoking Location permission for the sample app with geofences configured…no errors logged so far. 🤷♂️
from shiny.
Note: I reformatted the original exception stack trace as code, as some of the generics (specifically <OnReceive>
) were being interpreted as HTML. I'm looking closer at the Process()
code that moved in 1efa4eb, and there are a couple NRE opportunities:
shiny/src/Shiny.Locations/Platforms/Android/GeofenceManagerImpl.cs
Lines 60 to 68 in 5cff99d
I took a closer look at the GeofencingEvent
docs and I'm reasonably certain it's an unhandled geofence error. PR incoming (separate from #40).
from shiny.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from shiny.
Related Issues (20)
- [Bug]: HOT 1
- [Bug]: Shiny Push Notification - Delegate On Entry HOT 2
- [Bug]: PushManager never returns a value from the RequestAccess task. HOT 4
- [Feature Request]: Support Push notifications for iOS Simulator HOT 1
- [Bug]: BLE CharacteristicInfo Discovery HOT 6
- [Bug]: Notification doesn't appear when the app is running HOT 3
- [Bug]: System.ObjectDisposedException: ObjectDisposed_Generic ObjectDisposed_ObjectName_Name, Android.OS.PowerManager HOT 13
- [Bug]: Notification not clickable HOT 2
- [Bug]: The devices are not disconnected with 2 Bluetooth connections HOT 1
- [Feature Request]:HttpTransferStore not Found in MAUI HOT 5
- [Bug]: The Setup Muai essentials media picker option has a bug at building time HOT 1
- Push: OnEntry / OnReceived not fired when running in background / or closed HOT 1
- [Bug]: Shiny Unregister() HOT 3
- [Feature Request]: Add Exception and Logger Property to LogStore SQLite HOT 2
- [Bug]: Push notification iOS simulator HOT 1
- [Bug]: Push notification on iOS causes multiple calls to OnReceived and app crashing HOT 7
- [Bug]: BLE Android peripheral renaming does not update peripheral advertisement name HOT 1
- [Bug]: Click on notification poppup => 'This window is already associated with an active Activity (MauiShinyJobNotify.MainActivity). HOT 4
- [Bug]: Get/Read two or more Characteristics with same serviceUuid and characteristicUuid not working properly HOT 4
- [Bug]: OnNewToken repeatadly called HOT 6
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 shiny.