Closed michelebombardi closed 8 years ago
So this line: https://github.com/bradmartin/nativescript-floatingactionbutton/blob/master/fab-common.js#L43. I'll have to find some time to fix this piece, it's not a major issue to fix but I don't have time right now to fix and test.
Publishing 2.2.6 soon with the fix, it's here https://github.com/bradmartin/nativescript-floatingactionbutton/blob/master/fab-common.js#L43
@bradmartin We're using the latest version of the plugin and we've got the same issue on Android
Could it be that there is a regression somewhere?
Unable to resume activity {com.chronogolf.booking.chronogolf/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onStart failed
TypeError: Cannot read property 'getVisibility' of null
File: "<embedded>, line: 815, column: 6107
StackTrace:
Frame: function:'View.(anonymous function)', file:'<embedded>', line: 815, column: 6108
Frame: function:'S', file:'<embedded>', line: 1447, column: 13221
Frame: function:'e', file:'<embedded>', line: 1447, column: 12304
Frame: function:'t.onResumeNativeUpdates', file:'<embedded>', line: 2239, column: 12480
Frame: function:'t._resumeNativeUpdates', file:'<embedded>', line: 2239, column: 3637
Frame: function:'t.onLoaded', file:'<embedded>', line: 2239, column: 3145
Frame: function:'View.onLoaded', file:'<embedded>', line: 815, column: 1335
Frame: function:'', file:'<embedded>', line: 2239, column: 3279
Frame: function:'t.eachChildView', file:'<embedded>', line: 2394, column: 2546
Frame: function:'t.eachChild'...
Could be, not sure. I have the FAB in multiple apps in production on app stores and haven't had this crash occur. So I'm really not sure. Do you know what file is referenced by the <embedded>
tag in the exception?
I don't know what the <embedded>
tag refers to.
Fab button is included on my homepage and it looks like that:
<GridLayout column="*" rows="*">
<GridLayout row="0" columns="*", rows="*, auto">
<ScrollView row="0">
[....]
</ScrollView>
</GridLayout>
<FAB
*ngIf="user?.id"
row="0"
[class.no-margin]="FABNoMargin"
(tap)="goToBookingWidget()"
icon="res://ic_add_white"
backColor="#159c28"
rippleColor="#e2f2e6"
class="fab-action">
</FAB>
</GridLayout>
I bet it's an angular type thing with the ngIf. If you remove that what happens?
On Mon, Aug 28, 2017, 9:48 AM Jeremy notifications@github.com wrote:
I don't know what the
tag refers to. Fab button is included on my homepage and it looks like that: [....] <FAB *ngIf="user?.id" row="0" [class.no-margin]="FABNoMargin" (tap)="goToBookingWidget()" icon="res://ic_add_white" backColor="#159c28" rippleColor="#e2f2e6" class="fab-action">
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bradmartin/nativescript-floatingactionbutton/issues/36#issuecomment-325374901, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhP67YTk4mMr5VK28O1_unn2WCdtiks5sctMzgaJpZM4KkK6A .
I can't always reproduce it in local. The issue is raised in Sentry for an app I just released last week.
I'll try to dig into that way. Thanks for the feedback 👍
Cool, keep me posted. Just a guess that when the ngIf
is determining to show or not (visibility) it's not happening at the right time. If you keep having issues, it might be worth mentioning this on the NS core repo to see if they have an idea but they'll prob need a better stacktrace with out the <embedded>
tag. I wonder if that's from webpack/uglify on a release build.
As a quick test, I'd try using the NS visibility
instead of ngIf and see if that helps any. If so then the core team should have an idea on a correct fix or someone more knowledgable about angular than I 😄
I'm using this plugin in my NativeScript Angular 2 project and when resuming the app often an exception is thrown causing an app crash.
My html:
The full stacktrace: