Skip to content
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

Proxy is not defined at new CapacitorWeb 😭 #913

Closed
mina-j-adly opened this issue Oct 22, 2018 · 13 comments
Closed

Proxy is not defined at new CapacitorWeb 😭 #913

mina-j-adly opened this issue Oct 22, 2018 · 13 comments

Comments

@mina-j-adly
Copy link

I just call Device from '@capacitor/core' and run app , what's the wrong ?

image

@mlynch
Copy link
Contributor

mlynch commented Oct 22, 2018

Looks to be running on a very old version of Android. We support 5 and above. What version is that?

@mina-j-adly
Copy link
Author

This is 5.1.1 version, I tried to run on actual device (8 version) and it was good but on emulator not working

@jcesarmobile
Copy link
Member

The problem is the same as on
#456

Proxy is not available in your device. In Android it should work, but as you are testing in an emulator it’s probably out of date. Try updating the sdks for emulators and the system Webview/chrome if possible.

@deveshmishra34
Copy link

This issue is occurs when we use capacitor plugins in lower android devices like android 5, 5.1, 6. But if you remove the capacitor plugin usage application will work but then css will not render properly. Style will not apply as you want.
Can any one help.... otherwise i have to move ionic 3

@kplaricos
Copy link

kplaricos commented Apr 24, 2019

Having the same issue when i use capacitor PushNotification plugin.
I'm using android 8.1 device for test.

ionic info output

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.3.0
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.1

Capacitor:

   capacitor (Capacitor CLI) : 1.0.0-beta.19
   @capacitor/core           : 1.0.0-beta.19

Cordova:

   cordova (Cordova CLI) : 9.0.0
   Cordova Platforms     : none
   Cordova Plugins       : no whitelisted plugins (0 plugins total)

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.0
   NodeJS     : v10.15.3 (/usr/local/bin/node)
   npm        : 6.9.0
   OS         : macOS Mojave
   Xcode      : Xcode 10.1 Build version 10B61

@jcesarmobile
Copy link
Member

Would be good to know the device, android 8 devices should use the webview based on the installed chrome. Which chrome do you have installed? What do you get if you run navigator.userAgent?

@kplaricos
Copy link

I tested now with another device Infinix X606 Build/O11019 and it works.

Navigator agent Mozilla/5.0 (Linux; Android 8.1.0; Infinix X606 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/73.0.3683.90 Mobile Safari/537.36

If i understand, users should have chrome installed on their phone before my app can run ?

@kplaricos
Copy link

kplaricos commented Apr 24, 2019 via email

@jcesarmobile
Copy link
Member

Starting on Android 7.0, Google started shipping Chrome with Android.
I've tested on my Android 7, 8 and 9 devices and I can't uninstall Chrome on any of them.
I can only disable it, but that doesn't seem to affect any of my apps, the reported version still matches my chrome version.
https://developer.android.com/about/versions/nougat/android-7.0

Looks like some vendors managed to not ship Chrome or use a different WebView instead of the based on Chrome. In that cases the results are unpredictable for us.

As of how to notify the users, you can probably check the user agent and show some custom message if they are below Chrome 67 as that's the version that included proxy.

@deveshmishra34
Copy link

The best solution is don't use capacitor plugins...instead user push plugin for push notification. Until someone come with a patch. I had a same issues, i just remove capacitor plugin usage in my app. And it works fine.

@woodstream
Copy link

It should be something like this,when JS change ES6 to ES5,the "Proxy" from ES6 is not change and can't be recognized by ES5,so the solution is to implement custom "Proxy" for ES5.

@JeongJun-Lee
Copy link

Same here. Because Ionic build on Angular9 has a issue, ionic-team/ionic-cli#4262. I built with the conf, "target": "es5" in tsconfig.json. When I open it on the mobile Chrome v79, "The proxy is not defined error" happens.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
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

8 participants
@mlynch @jcesarmobile @woodstream @deveshmishra34 @JeongJun-Lee @mina-j-adly @kplaricos and others