-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash(iOS): TypeError: undefined is not an object (evaluating 'measureSpec.setColumn') #7226
Comments
Hi @NickIliev Unfortunately I haven't been able to write a test project that reproduce the problem. I can reproduce it in our private app, but I can't share the code. I've create a small PR that fixes the problem locally, but I'd really wish I had a proper way to reproduce it. |
I've identified the components in our project that causes the problem. The View tree is like this
Here is the template for <StackLayout>
<StackLayout *ngIf="failed" class="p-5">
<Label [text]="failedText" textWrap="true" class="t-14 text-center text-danger"></Label>
<Button [text]="retryBtnText" class="btn btn-rounded-sm btn-outline" [accessibilityLabel]="retryBtnText" (tap)="onRetry()" touchable></Button>
</StackLayout>
</StackLayout> Here is how it is used in our <lyt-failed-retry [failed]="isBookshelfFailed$ | async" (retry)="onRefreshFailed()"></lyt-failed-retry> If switch from |
Hi @NickIliev, I've finally managed to reproduce the problem see: https://github.com/m-abs/tns-measurespace-undef We have a outer The The |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
In the past month we've tracked 20+ crashes with this error:
To Reproduce
For now we only have the crash logs from Google Analytics.
Expected behavior
The app to not crash.
Additional context
I think problem is caused in this function:
https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts#L73-L97
And I'm guessing the child layout doesn't have a
measureSpec
in theGridLayout.map
here:https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts#L138
I suggest adding a check for
undefined
inupdateMeasureSpecs
and adding the missingmeasureSpec
to the map..The text was updated successfully, but these errors were encountered: