Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Error loading url behind a proxy #96

Open
marco-1988 opened this issue Nov 9, 2022 · 1 comment
Open

Error loading url behind a proxy #96

marco-1988 opened this issue Nov 9, 2022 · 1 comment

Comments

@marco-1988
Copy link

Greetings

I am trying to load a url in the webview that is configured behind a reverse proxy, that if I open it in the browser with url launcher everything is ok, instead with the webview it does not load it and gives this error when I try to load it:

`======== Exception caught by services library ======================================================
The following _CastError was thrown during a platform message callback:
Null check operator used on a null value

When the exception was thrown, this was the stack:
#0 _WebViewXState.build.onWebResourceError (package:webviewx/src/view/impl/mobile.dart:167:34)
#1 _PlatformCallbacksHandler.onWebResourceError (package:webview_flutter/src/webview.dart:490:34)
#2 WebKitWebViewPlatformController.navigationDelegate.. (package:webview_flutter_wkwebview/src/web_kit_webview_widget.dart:170:50)
#3 WKNavigationDelegateFlutterApiImpl.didFailProvisionalNavigation (package:webview_flutter_wkwebview/src/web_kit/web_kit_api_impls.dart:822:15)
#4 WKNavigationDelegateFlutterApi.setup. (package:webview_flutter_wkwebview/src/common/web_kit.pigeon.dart:1511:15)
#5 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:197:49)
#6 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:387:35)
#7 _invoke2. (dart:ui/hooks.dart:189:15)
#11 _invoke2 (dart:ui/hooks.dart:188:10)
#12 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)
#13 _Channel.push (dart:ui/channel_buffers.dart:132:31)
#14 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)
#15 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:599:22)
#16 _dispatchPlatformMessage (dart:ui/hooks.dart:89:31)
(elided 3 frames from dart:async)
====================================================================================================`

Can you help me? Thank you

@marco-1988
Copy link
Author

I have found that on the web (release and debug) and Android (I have only tried debugging) it works fine. On iOS in debug it does not work and returns the error I indicated. I have not tried if in release it has the same problem.

For iOS do I have to do something extra to make it work? The error I have only with this link which is behind the proxy, but on the Web and Android with this link I have no problem. Can you help me? Thank you

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

No branches or pull requests

1 participant