Ionic 3 Proxy not working after build and deployed to Server - ionic-framework

I am new to Ionic and currently using ionic 3 for making progressive mobile app. I was using ionic proxy on my local environment to avoid CORS issue which was working perfectly but when I build it using ionic build command and deployed it on my server, proxy seems to be not working.
Can anybody please help me out.
Thanks alot in advance.
ionic.config.json file :
{
"name": "abc",
"app_id": "",
"type": "ionic-angular",
"integrations": {
"cordova": {}
},
"proxies": [
{
"path": "/",
"proxyUrl": "https://example.com"
}
]
}
ionic info :
#ionic/cli-plugin-proxy : 1.5.8
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : browser 5.0.3
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v6.11.3
npm : 3.10.10
OS : Windows 10

Related

Ionic 4 app shows api data in browser but on device it doen't shows api data

When I run Ionic 4 app, the browser shows api data but when i run same app on android device it doen't shows api data.
I am using Laravel as a backend, from where i am fetching api data.
The Ionic info is -
Ionic:
Ionic CLI : 6.5.0 (C:\Users\LENOVO\AppData\Roaming\npm\node_modules\#ionic\cli)
Ionic Framework : #ionic/angular 4.1.1
#angular-devkit/build-angular : 0.803.26
#angular-devkit/schematics : 8.3.26
#angular/cli : 8.3.26
#ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : not installed
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 4 other plugins)
Utility:
cordova-res : not installed
native-run : 1.0.0
System:
NodeJS : v12.16.1 (C:\Program Files (x86)\nodejs\node.exe)
npm : 6.13.4
OS : Windows 10
I am really stuck here...
Your Problem is Cors you can install middleware in laravel to avoide the problem
Or you can test your application in the chrome disable securite
Try to Run :
chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
and test your application in this chrome and let me khnow

Problem with serving Ionic 3 app in browser

I have huge problems when serving app in browser.
Upon running it prompts with 'gap_init:3'
I know it means android code is deployed in browser , which is wrong.
First run on device is fine. But next time I run it in browser I got this annoying error
Here are my npm commands with Ionic info bellow
"serve": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build"
"run": "ionic cordova run android --device --enableLint false "
Ionic info:
Ionic CLI : 5.4.13 (C:\Users\xxx\AppData\Roaming\nvm\v10.15.3\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.3
#ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res (update available: 0.8.1) : 0.6.0
native-run (update available: 0.3.0) : 0.2.8
System:
Android SDK Tools : 26.1.1 (e:\Android\SDK)
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

Ionic 4 CSS Variables

I'm trying to use the variables defined on the variables.scss file, but remote debugging the app i see that no variable was defined on :root and on the elements that use it has Invalid value.
variables.scss
:root {
/** primary **/
--ion-color-primary: #d76f47;
... more variables
}
page.scss:
.product-name {
color: var(----ion-color-primary);
}
angular.json (untouched)
...
"styles": [
{
"input": "src/theme/variables.scss"
},
{
"input": "src/global.scss"
}
],
...
This only happens while runing on the device (Android 4.4.2).
While on the browser everything works as it should be.
Ionic:
ionic (Ionic CLI) : 4.3.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.0-beta.16
#angular-devkit/build-angular : 0.10.6
#angular-devkit/schematics : 7.0.6
#angular/cli : 7.0.6
#ionic/angular-toolkit : 1.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 7.1.2, browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.3, (and 6 other plugins)
System:
Android SDK Tools : 26.1.1
NodeJS : v9.10.1 (/usr/local/bin/node)
npm : 6.2.0
OS : Linux 4.15
Thanks in advance.
If you want to change color for your custom dom
.product-name {
color: var(--ion-color-primary);
}
but for the dom that has shadow root maybe you should to confirm if it has variable
dom-name {
--color: var(----ion-color-primary); //if dom declare --color as css4 variable
}

ionic pro live deploy download not updating UI

Im working with an ionic app with Ionic Deploy.
I followed the example
async performManualUpdate() {
try {
const haveUpdate = await Pro.deploy.check();
if (haveUpdate){
this.downloadProgress = 0;
await Pro.deploy.download((progress) => {
this.downloadProgress = progress;
})
await Pro.deploy.extract();
await Pro.deploy.redirect();
}
} catch (err) {
}
This works. However, the progress is not updating in view, like it is not "realtime".
Tried to find a workaround but there's no success. Anyone can help me?
Here is my [ionic info]
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.4.0 browser 5.0.1 ios 4.5.4
Ionic Framework : ionic-angular 3.2.1
System:
ios-deploy : 1.9.2
Node : v8.9.1
npm : 5.8.0
OS : macOS Sierra
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro

Getting "Sorry! The configured backend (pro) does not know about ionic upload" When trying to upload the Ionic App

I'm trying to upload the App I built to my Ionic Pro account.
I've linked my account and added the SSH keys but after running ionic upload I'm getting this error
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
This is My Ionic Info
cli packages: (/home/jos/Desktop/helloapp/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : not installed globally
local packages:
Cordova Platforms : android 6.2.3 browser 4.1.0
Ionic Framework : ionic1 1.3.1
System:
Android SDK Tools : 26.0.2
Node : v6.11.0
npm : 3.10.10
OS : Linux 3.13
ionic upload doesn't work with backend pro, you have to create an app
on https://dashboard.ionicjs.com/apps and there will be a setup guide :)