This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.
[Bug] Provided VisualElement cannot be parent to SnackBar Parameter name: sender #1556
Open
Description
Description
DisplayToastAsync() is worked, after closing app and reopen app from float service button, DisplayToastAsync() is shown but app crash
Toast.MakeText() still worked fine even after reopen app from float service button
Steps to Reproduce
- Create App with float service button
- Execute Toast (Worked)
await this.DisplayToastAsync(options);
- Execute float service button
- Close App
- Reopen App from float service button
- Execute Toast (Crash)
await this.DisplayToastAsync(options);
Error Debug:
[StaticLayout] maxLineHeight should not be -1. maxLines:10 lineCount:10
**System.ArgumentException:** 'Provided VisualElement cannot be parent to SnackBar
Parameter name: sender'
Expected Behavior
no crash
Actual Behavior
Snackbar Toast is shown but then app crash
Basic Information
- Version with issue: 1.2.0
- Last known good version: - (First Time Use)
- IDE: Visual Studio 2019
- Platform Target Frameworks:
- Android: 9
- Android Support Library Version:
- Nuget Packages: 1.2.0
- Affected Devices: Android
Workaround
try { await this.DisplayToastAsync(options); } catch {}