-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-webWeb applications specificallyWeb applications specifically
Description
When a Flutter Web app is loaded in an iframe in another site and it is hidden (e.g. with display: none
), an exception is thrown and the app is no longer usable, even after making it visible again.
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ dart_sdk.js:19110:15
The following NativeJavaScriptObject object was thrown during a scheduler callback: dart_sdk.js:19110:15
[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: dart_sdk.js:19110:15
http://localhost:8081/chat/packages/flutter_web_ui/ui.ddc.js :: clear :: line 811" data: no] dart_sdk.js:19110:15
dart_sdk.js:19110:15
When the exception was thrown, this was the stack: dart_sdk.js:19110:15
Non-error `[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8081/chat/packages/flutter_web_ui/ui.ddc.js :: clear :: line 811" data: no]` thrown by JS does not have stack trace. dart_sdk.js:19110:15
Caught in Dart at: dart_sdk.js:19110:15
dart_sdk.js:19110:15
dart:sdk_internal 4591:14 stackTrace dart_sdk.js:19110:15
package:flutter_web/src/scheduler/packages/flutter_web/src/scheduler/binding.dart 1031:25 [_invokeFrameCallback] dart_sdk.js:19110:15
package:flutter_web/src/scheduler/packages/flutter_web/src/scheduler/binding.dart 963:9 handleDrawFrame dart_sdk.js:19110:15
package:flutter_web/src/scheduler/packages/flutter_web/src/scheduler/binding.dart 778:7 <fn> dart_sdk.js:19110:15
dart:sdk_internal 15773:9 internalCallback dart_sdk.js:19110:15
════════════════════════════════════════════════════════════════════════════════════════════════════ dart_sdk.js:19110:15
Flutter Web on Firefox is particularly sensitive to this lack of rendering space, but with Chrome either it's not perfectly handled.
In the meantime, it's possible to check for MediaQuery.of(context).size.shortestSide == 0
and avoid building the app, but it doesn't solve everything.
flutter_web version: commit 8d4c12a (June 29)
Mac OS X 10.14.5 18F132, locale en-KR
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-webWeb applications specificallyWeb applications specifically