Proxy is undefined at .meteor/local/build/programs/web.cordova/app/app.js


#1

Hi
I am trying to run my app on android device but it fails.
I checked simple-todo app is running well on the device but
I am not sure what is the problem on my project.
I wrote very small amount of code originated from todo appliection
I think build was success but at run time , the error is happenning now

below is the error message on

meteor run android-device

UILD SUCCESSFUL in 2s
45 actionable tasks: 1 executed, 44 up-to-date
Built the following apk(s): evice            |
	/Users/cskang/projects/fondue/.meteor/local/cordova-build/platforms/android/build/outputs/apk/debug/android-debug.apk
Using apk: /Users/cskang/projects/fondue/.meteor/local/cordova-build/platforms/android/build/outputs/apk/debug/android-debug.apk
Package name: com.idgyyol2k0ucwh.csubxfbo23wa
LAUNCH SUCCESSp on Android Device            -
Tailing logs for Android Device
%% Running command: avdmanager list target
=> Started app on Android Device.
%% Command finished with error code 0: avdmanager list,target
I20180409-17:45:10.574(9)? I/CordovaLog(16326): Changing log level to DEBUG(3)
I20180409-17:45:10.626(9)? I/chromium(16326): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
I20180409-17:45:10.627(9)? W/chromium(16326): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
I20180409-17:45:10.627(9)? I/MeteorWebApp(16326): Serving asset bundle with version: 046a1f21cc67d8a8bed40dc0f69fbf6861de09ca
I20180409-17:45:10.628(9) (android:http://localhost:12104/:6) Viewport argument key "viewport-fit" not recognized and ignored.
I20180409-17:45:10.628(9)? I/chromium(16326): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I20180409-17:45:10.629(9)? I/chromium(16326): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I20180409-17:45:10.629(9) (android:http://localhost:12104/app/app.js:1664) Uncaught ReferenceError: Proxy is not defined      
I20180409-17:45:10.629(9) (android:http://localhost:12104/:97) Viewport argument key "shrink-to-fit" not recognized and ignored.

(android:http://localhost:12104/app/app.js:1664) Uncaught ReferenceError: Proxy is not defined
it must be major problem…

the error code is below, I think meteor css modules generates the code
I am using meteor-css-modules and scss together

},"styles.scss.js":function(require,exports,module){

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                               //
// client/styles.scss.js                                                                                         //
//                                                                                                               //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                                                                                 //
var module1 = module;
module1.export({
"default": function () {
return styles;
},
styles: function () {
return styles;
}
});
var styles = new Proxy({
"container": "_client__styles__container"
}, {
get: function (target, name) {
return name in target ? target[name] : console.warn(name, ': CSS module class not found in client/styles.scss');
}
});
exports.__esModule = true;

below is meteor list result

accounts-password           1.5.1  Password support for accounts
aldeed:collection2          3.0.0  Automatic validation of Meteor Mongo insert and up...
audit-argument-checks       1.0.7  Try to detect inadequate input sanitization
check                       1.3.1  Check whether a value matches a pattern
dburles:collection-helpers  1.1.0  Transform your collections with helpers that you d...
ddp-rate-limiter            1.0.7  The DDPRateLimiter allows users to add rate limits...
dynamic-import              0.3.0  Runtime support for Meteor 1.5 dynamic import(...)...
ecmascript                  0.10.6* Compiler plugin that supports ES2015+ in all .js ...
es5-shim                    4.7.3  Shims and polyfills to improve ECMAScript 5 support
mdg:validated-method        1.1.0  A simple wrapper for Meteor.methods
mdg:validation-error        0.5.1  A standard validation error to be used by form/met...
meteor-base                 1.3.0  Packages that every Meteor app needs
meyerweb-reset              1.0.7  reset.css v2.0 from http://meyerweb.com/eric/tools...
mobile-experience           1.0.5  Packages for a great mobile user experience
mongo                       1.4.5* Adaptor for using MongoDB and Minimongo over DDP
nathantreid:css-modules     3.1.0  CSS modules implementation. CSS for components!
react-meteor-data           0.2.16  React higher-order component for reactively track...
reactive-var                1.0.11  Reactive variable
reywood:publish-composite   1.5.2* Publish a set of related documents from multiple c...
session                     1.1.7  Session variable
shell-server                0.3.1  Server-side component of the `meteor shell` command.
standard-minifier-css       1.4.1  Standard css minifier used with Meteor apps by def...
standard-minifier-js        2.3.3  Standard javascript minifiers used with Meteor app...
static-html                 1.2.2  Define static page content in .html files
tracker                     1.1.3  Dependency tracker to allow reactive callbacks
universe:i18n               1.16.0

the app seems loading but only white background is showing and content is not showing.

it works fine on android simulator

Thank you!!!


#3

I wrote wrong answer so I deleted it and post new correct answer

I copy the code in https://github.com/GoogleChrome/proxy-polyfill/blob/master/proxy.min.js and paste it on /client/proxy.js

I don’t know why it works

Anyway, It works.

Is there anyone to let me know how to add browser polyfill correctly?

Thank you!