首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤振web应用程序在发布时显示空白屏幕

颤振web应用程序在发布时显示空白屏幕
EN

Stack Overflow用户
提问于 2022-11-24 13:04:37
回答 1查看 30关注 0票数 0

我正在做一个颤振项目。

我需要从项目中创建一个web应用程序。

这个网络应用程序是在https://appcapenergy.com/web上发布的。

今天我做了一个项目的更新,我已经发布了iOS应用程序和安卓应用程序到商店,苹果应用商店和谷歌游戏。

现在我已经建立了网络应用程序,但它不起作用。

在本地或服务器上启动web应用程序时,它只显示一个空白屏幕。

这里有浏览器检查控制台日志:

代码语言:javascript
运行
复制
Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('http://localhost:61121/') with script ('http://localhost:61121/firebase-messaging-sw.js'): A bad HTTP response code (404) was received when fetching the script.
main.dart.js:72 Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
    at HTMLDocument.<anonymous> (main.dart.js:72:22)
    at client.js:24535:40
    at _wrapJsFunctionForAsync_closure.$protected (client.js:3471:15)
    at _wrapJsFunctionForAsync_closure.call$2 (client.js:11541:12)
    at _awaitOnObject_closure.call$1 (client.js:11529:32)
    at StaticClosure._rootRunUnary (client.js:3833:18)
    at _CustomZone.runUnary$2$2 (client.js:12941:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (client.js:11973:51)
    at Object._Future__propagateToListeners (client.js:3613:93)
    at _Future._completeWithValue$1 (client.js:11799:9)
    at _AsyncAwaitCompleter.complete$1 (client.js:11512:14)
    at Object._asyncReturn (client.js:3443:17)
    at client.js:8734:24
    at _wrapJsFunctionForAsync_closure.$protected (client.js:3471:15)
    at _wrapJsFunctionForAsync_closure.call$2 (client.js:11541:12)
    at _awaitOnObject_closure.call$1 (client.js:11529:32)
    at StaticClosure._rootRunUnary (client.js:3833:18)
    at _CustomZone.runUnary$2$2 (client.js:12941:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (client.js:11973:51)
    at Object._Future__propagateToListeners (client.js:3613:93)
    at _Future._completeWithValue$1 (client.js:11799:9)
    at _AsyncAwaitCompleter.complete$1 (client.js:11512:14)
    at Object._asyncReturn (client.js:3443:17)
    at client.js:25007:24
    at _wrapJsFunctionForAsync_closure.$protected (client.js:3471:15)
    at _wrapJsFunctionForAsync_closure.call$2 (client.js:11541:12)
    at _awaitOnObject_closure.call$1 (client.js:11529:32)
    at StaticClosure._rootRunUnary (client.js:3833:18)
    at _CustomZone.runUnary$2$2 (client.js:12941:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (client.js:11973:51)
    at Object._Future__propagateToListeners (client.js:3613:93)
    at _Future._completeWithValue$1 (client.js:11799:9)
    at _AsyncAwaitCompleter.complete$1 (client.js:11512:14)
    at Object._asyncReturn (client.js:3443:17)
    at client.js:24984:24
    at _wrapJsFunctionForAsync_closure.$protected (client.js:3471:15)
    at _wrapJsFunctionForAsync_closure.call$2 (client.js:11541:12)
    at _awaitOnObject_closure.call$1 (client.js:11529:32)
    at StaticClosure._rootRunUnary (client.js:3833:18)
    at _CustomZone.runUnary$2$2 (client.js:12941:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (client.js:11973:51)
    at Object._Future__propagateToListeners (client.js:3613:93)
    at _Future._completeWithValue$1 (client.js:11799:9)
    at _Future__asyncCompleteWithValue_closure.call$0 (client.js:11901:18)
    at StaticClosure._rootRun (client.js:3818:16)
    at _CustomZone.run$1$1 (client.js:12933:39)
    at _CustomZone.runGuarded$1 (client.js:12876:14)
    at _CustomZone_bindCallbackGuarded_closure.call$0 (client.js:13071:25)
    at Object._microtaskLoop (client.js:3677:24)
    at StaticClosure._startMicrotaskLoop (client.js:3683:11)
    at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (client.js:11417:9)
    at invokeClosure (client.js:1277:26)
    at MutationObserver.<anonymous> (client.js:1296:18)
​ This app is linked to the debug service: ws://127.0.0.1:61185/AiCArEXaM00=/ws
js_primitives.dart:30 Flutter Web Bootstrap: Programmatic
errors.dart:266 Uncaught (in promise) Error: Unsupported operation: Platform._operatingSystem
    at Object.throw_ [as throw] (errors.dart:266:49)
    at _Platform._operatingSystem (io_patch.dart:244:5)
    at get operatingSystem [as operatingSystem] (platform_impl.dart:56:40)
    at get _operatingSystem (platform.dart:64:45)
    at desc.get [as _operatingSystem] (operations.dart:839:8)
    at get isIOS (platform.dart:153:47)
    at desc.get [as isIOS] (operations.dart:839:8)
    at MethodChannelStripeFactory.create (method_channel_stripe.dart:479:33)
    at get _instance (stripe_platform_interface.dart:12:72)
    at desc.get [as _instance] (operations.dart:839:8)
    at get instance [as instance] (stripe_platform_interface.dart:17:41)
    at get _platform [as _platform] (stripe.dart:535:35)
    at stripe.Stripe.__.markNeedsSettings (stripe.dart:542:20)
    at set publishableKey [as publishableKey] (stripe.dart:24:14)
    at main$ (main.dart:38:10)
    at main$.next (<anonymous>)
    at runBody (async_patch.dart:84:54)
    at Object._async [as async] (async_patch.dart:123:5)
    at main$ (main.dart:34:5)
    at web_entrypoint.dart:24:31
    at Object._checkAndCall (operations.dart:334:14)
    at Object.dcall (operations.dart:339:39)
    at initialization.dart:77:15
    at Generator.next (<anonymous>)
    at async_patch.dart:45:50
    at _RootZone.runUnary (zone.dart:1653:54)
    at _FutureListener.thenAwait.handleValue (future_impl.dart:147:18)
    at handleValueCallback (future_impl.dart:766:44)
    at _Future._propagateToListeners (future_impl.dart:795:13)
    at [_completeWithValue] (future_impl.dart:566:5)
    at async._AsyncCallbackEntry.new.callback (future_impl.dart:639:7)
    at Object._microtaskLoop (schedule_microtask.dart:40:11)
    at _startMicrotaskLoop (schedule_microtask.dart:49:5)
    at async_patch.dart:166:15
throw_ @ errors.dart:266
_operatingSystem @ io_patch.dart:244
get operatingSystem @ platform_impl.dart:56
get _operatingSystem @ platform.dart:64
desc.get @ operations.dart:839
get isIOS @ platform.dart:153
desc.get @ operations.dart:839
create @ method_channel_stripe.dart:479
get _instance @ stripe_platform_interface.dart:12
desc.get @ operations.dart:839
get instance @ stripe_platform_interface.dart:17
get _platform @ stripe.dart:535
markNeedsSettings @ stripe.dart:542
set publishableKey @ stripe.dart:24
main$ @ main.dart:38
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
main$ @ main.dart:34
(anonymous) @ web_entrypoint.dart:24
_checkAndCall @ operations.dart:334
dcall @ operations.dart:339
(anonymous) @ initialization.dart:77
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1653
handleValue @ future_impl.dart:147
handleValueCallback @ future_impl.dart:766
_propagateToListeners @ future_impl.dart:795
[_completeWithValue] @ future_impl.dart:566
(anonymous) @ future_impl.dart:639
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1458
scheduleMicrotask @ zone.dart:1673
[_asyncCompleteWithValue] @ future_impl.dart:638
[_asyncComplete] @ future_impl.dart:598
runBody @ async_patch.dart:108
_async @ async_patch.dart:123
initializeEngineUi @ initialization.dart:224
(anonymous) @ initialization.dart:75
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
(anonymous) @ initialization.dart:71
_checkAndCall @ operations.dart:334
callMethod @ operations.dart:398
dsend @ operations.dart:402
(anonymous) @ app_bootstrap.dart:72
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
(anonymous) @ app_bootstrap.dart:70
_checkAndCall @ operations.dart:334
dcall @ operations.dart:339
ret @ js_patch.dart:413
(anonymous) @ app_bootstrap.dart:68
_checkAndCall @ operations.dart:334
dcall @ operations.dart:339
ret @ js_patch.dart:413
(anonymous) @ web:53

我需要你的帮助来解决这个问题

EN

Stack Overflow用户

发布于 2022-11-24 13:13:38

请做这个!

我在我的导航器(Chrome)的控制台中运行它,不再有错误消息:

代码语言:javascript
运行
复制
navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

并检查这个链接https://www.fluttercampus.com/guide/163/how-to-fix-blank-white-page-from-hosted-flutter-web-app/#:~:text=html%20with%20code%20editor%2C%20you,attribute%20to%20solve%20this%20problem

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74561271

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档