If I deploy my application ionic 2 on android, it is all white

If I deploy my application ionic 2 on android, it is all white

While it works well with ionic serve

What command are you using to build you app for Android?

Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: https://ionic.zone/debug/remote-debug-your-app#android Look at the console and network tabs for errors.

If you can’t resolve the problem yourself, please post the output of ionic info and the content of your packages.json so we know what environment we are dealing with.

my info
our system information:

ordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
Xcode version: Not installed
/***********************************/
my pakages.json

{
“name”: “ionic-hello-world”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “2.4.8”,
"@angular/compiler": “2.4.8”,
"@angular/compiler-cli": “2.4.8”,
"@angular/core": “2.4.8”,
"@angular/forms": “2.4.8”,
"@angular/http": “2.4.8”,
"@angular/platform-browser": “2.4.8”,
"@angular/platform-browser-dynamic": “2.4.8”,
"@angular/platform-server": “2.4.8”,
"@ionic-native/core": “^3.6.0”,
"@ionic-native/geolocation": “^3.4.4”,
"@ionic-native/http": “^3.6.1”,
"@ionic/cloud-angular": “^0.11.0”,
"@ionic/storage": “^2.0.0”,
“ionic-angular”: “2.2.0”,
“ionic-native”: “2.4.1”,
“ionicons”: “3.0.0”,
“rxjs”: “5.0.1”,
“sw-toolbox”: “3.4.0”,
“zone.js”: “0.7.2”
},
“devDependencies”: {
"@ionic/app-scripts": “1.1.4”,
“typescript”: “2.0.9”
},
“cordovaPlugins”: [
“cordova-plugin-whitelist”,
“cordova-plugin-console”,
“cordova-plugin-statusbar”,
“cordova-plugin-device”,
“ionic-plugin-keyboard”,
“cordova-plugin-splashscreen”
],
“cordovaPlatforms”: [],
“description”: “E-TicketvIonic: An Ionic project”
}

You have [quote=“koyaja, post:3, topic:88790”]
"@ionic-native/core": “^3.6.0”,
[/quote]

and [quote=“koyaja, post:3, topic:88790”]
“ionic-native”: “2.4.1”,
[/quote]

. You should only have one of those.

Did you debug on the device?

Debugging does not appear when I run on android

It appears but take some time before starting and I also have a problem I used proxie to perform queries and it works on ionic serve but does not work on the devices

Ok i have a debug

Angular is running in the development mode. Call enableProdMode() to enable the production mode. lang.js:130
deviceready has not fired after 5 seconds. cordova.js:1223
Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them. index.js:383
Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them. bootstrap.js:15
DEVICE READY FIRED AFTER 9247 ms index.js:378
Ionic Native: deviceready event fired after 9148 ms bootstrap.js:10
point 1 restservice.ts:56
initializing ...... ag mode listagence.ts:32
fin listagence.ts:34
test home.ts:23
GET file:///api/branches/?longitude=0&latitude=0&radius=2147483647 net::ERR_FILE_NOT_FOUND polyfills.js:2
EXCEPTION: Response with status: 0  for URL: null error_handler.js:54

(I changed your post to format your code or error message correctly. Please use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.)

That is your problem. You are requesting a URL that doesn’t exist. How do you generate this URL?

I use proxy

 "proxies": [{
        "path": "/api/",
        "proxyUrl": "http://192.168.0.159:9090/Mobile/"
    }]

and use

this.http.get("/api/"+"..../"+id+"/../...",option).map(res =>res.json());

GitHub - ionic-team/ionic-cli: The Ionic command-line interface, scroll down to “Service Proxies:”:

The serve command can add some proxies to the http server. These proxies are useful if you are developing in the browser and you need to make calls to an external API.

This means that the proxy URL is only available in ionic serve, not in the application you deploy to devices or emulators. There you have to use the actual URL!

Change your this.http.get call to prepend http://192.168.0.159:9090/Mobile/ instead of /api/ and this error should go away (if this IP:Port is available from the device).

Here is the error if I replace the address

GET http://192.168.0.159:9090/MobileTicket/branches/?longitude=0&latitude=0&radius=2147483647 net::ERR_CONNECTION_REFUSED polyfills.js:2
EXCEPTION: Response with status: 0  for URL: null error_handler.js:54

Can you open that URL in a browser on that device?

Access to url requires a token so if i verify it says this site does not allow connection

That is set in option?
Have a look at the network tab in the dev tools to see what request your device is sending. Does this look correct? The error message “net::ERR_CONNECTION_REFUSED” normally means that it can’t reach the host.

is message to network

Request URL:http://192.168.0.159:9090/MobileTicket/branches/?longitude=0&latitude=0&radius=2147483647
Request Headers
Provisional headers are shown
accept:application/json
auth-token:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type:application/json
User-Agent:Mozilla/5.0 (Linux; Android 5.0.2; TECNO-C8 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36
X-DevTools-Emulate-Network-Conditions-Client-Id:BD51C246-E756-EB4D-6038-EF3161EA695B
x-wap-profile:http://218.249.47.94/Xianghe/MTK_LTE_Phone_L_UAprofile.xml
Query String Parametersview sourceview URL encoded
longitude:0
latitude:0
radius:2147483647

So do these headers look good? Are they what they should be?
No response?

i change adress and i recieve net::ERR_ADDRESS_UNREACHABLE

Ok, then you have to find out why your server refuses the connection with your normal request. Check if all the headers are present, if it is actually requesting the correct URL etc. Not much we can help with that.

think you
Until I find the solution can you help me with a write code that will check the server 15 second 15 second

No, please create a new topic for that. Thanks.