Skip to content

fix(ios): Setting of property mask on 'undefined' during view disposal #10404

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

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

CatchABus
Copy link
Contributor

PR Checklist

What is the current behavior?

iOS apps crash when trying to dispose native views that do not extend UIView (e.g. UITabBarItem) due to CALayers cleanup.

This trace was provided in discord:

[11:04:49.026] Debug: uncaughtErrorEvent - NativeScriptError: TypeError: Cannot set properties of undefined (setting 'mask')
  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught TypeError: Cannot set properties of undefined (setting 'mask')
   at
      clearLayerMask(file: src/webpack:/app/node_modules/@nativescript/core/ui/styling/background.ios.js:279:0)
      at clearBackgroundVisualEffects(file: src/webpack:/app/node_modules/@nativescript/core/ui/styling/background.ios.js:100:0)
      at disposeNativeView(file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view/index.ios.js:47:21)
      at _tearDownUI(file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view-base/index.js:809:0)
      at (file: src/webpack:/app/node_modules/@nativescript/core/ui/core/view-base/index.js:784:0)
      at (file: src/webpack:/app/node_modules/@nativescript-community/ui-material-core-tabs/tab-strip/index.js:36:0)
      at eachChild(file: src/webpack:/app/node_modules/@nativescript-community/ui-material-core-tabs/tab-strip/index.js:35:0)

What is the new behavior?

Apps will execute the steps after checking whether native view extends UIView.

@cla-bot cla-bot bot added the cla: yes label Oct 12, 2023
@CatchABus CatchABus changed the title fix(ios): Set mask of property undefined during view disposal fix(ios): Setting of property mask on 'undefined' during view disposal Oct 12, 2023
@JWiseCoder
Copy link

Is there any estimate on when 8.6.1 will be released? We haven't been able to update to 8.6.0 because of this issue.

@CatchABus
Copy link
Contributor Author

Is there any estimate on when 8.6.1 will be released? We haven't been able to update to 8.6.0 because of this issue.

We request for your patience until 8.6.1 comes out.
Till then, feel free to use next version of @nativescript/core. I think that fix is included there.

@NathanWalker
Copy link
Contributor

@JWiseCoder we’ll try to publish that patch before eod Thursday.

@NathanWalker
Copy link
Contributor

https://github.com/NativeScript/NativeScript/releases/tag/8.6.1-core

@JWiseCoder
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants