Viewport-fit issue


#1

hi guys after deploying to my android device i got this error
The key “viewport-fit” is not recognized and ignored.

ionic 3
cordova 6.5.0


#2

I’m facing the same issue.
Everything was working well, but in the past few days, none app build in running well on devices, only in browsers.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.9.2

Does anyone have a clue about this issue?

Regards,


#3

yes same issue can someone give as an idea about that


#4

It appears as warning for me, this is because this key is used to iPhone X and actual version of Chrome does not recognize this key, as the error says. Probably this is used by Safari and WKWebView but this should not break your build, can you check if you dont have any issues at your typescript code.


#5

Indeed, it even says that it ignores it. I’d be more concerned with the SyntaxError.


#6

i don’t have any error in my sypescript code


#7

i think that i don’t have any error in my sypescript code


#8

I did not change a line in the typescript. I ran the app, as it was created.

Command executed:

ionic start myapp blank
ionic cordova run android.

that is the only thing i did.

regards,


#9

Any update on this? I am getting this issue on my android app too. I did not manually add or create the viewport meta tag…ionic automatically did this when creating the project.


#10

It is a bug of @ionic/app-scripts : 3.1.0. You can fix this by upgrading your app-scripts to latest version or just replace the line:153 in node_modules/@ionic/app-scripts/dist/template.js with

return getTemplatePrefix(htmlFilePath) + "'" + content + "'" + getTemplateSuffix(htmlFilePath);


#11

Hi. This is my enviroment:

cli packages: (/home/martin/.nvm/versions/node/v9.3.0/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.9.2

The error is the same:
Viewport argument key "viewport-fit" not recognized and ignored. index.html:9

How can I resolve it?


#12

Hi, i solved issue by updating ionic version to latest ans issue was just
with Android KitKat ans not all version.


#13

Yes, I’m working with kitkat in fact. I try with:

npm install -g ionic

And:

npm install -g @ionic/cli-utils

But all seems to be updated.

Can you please run ionic info and paste the output here?


#14

I’m on road now, plz check un stackoverflow how to update correctly


#15

did you find solution


#16

I didn’t.
I update my enviroment. Now I have:

cli packages: (/home/martin/.nvm/versions/node/v9.3.0/lib/node_modules)

   @ionic/cli-utils  : 2.0.0-rc.4
   ionic (Ionic CLI) : 4.0.0-rc.4

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

   @ionic/app-scripts : 3.1.8
   Cordova Platforms  : android 6.2.3
   Ionic Framework    : ionic-angular 3.9.2

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v9.3.0
   npm               : 5.5.1
   OS                : Linux 4.13

Viewport error persists.