-
Notifications
You must be signed in to change notification settings - Fork 226
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
Failed to install 'cordova-plugin-screen-orientation': Error: Expected plugin to have ID "es6-promise-plugin" but got "cordova-plugin-screen-orientation".
on cordova prepare android
#55
Comments
cordova prepare android
Investigating. |
Can not reproduce:
Can you help me understand what I am doing differently?
The changes of 3.0.2 do not contain anything related to this plugin: 3.0.1...3.0.2 To be honest there are not real code changes at all except 1 tiny bugfix, the rest is CI configuration. |
Same for Android 7.1.1 by the way:
|
@janpio thanks for investigating. i will try to find out what causes the different behavior in our setup. it appears to work for me with a clean project as well but not with our larger config with multiple plugins. since there have not been any changes related to es6-promise-plugin i guess that this may have more to do with some cordova-lib stuff? I checked the part in plugman/fetch.js where the error is thrown and added a console.log:
(using cordova@8.0.0 here) feel free to close the issue though, since it's apparently not related to this plugins update |
Did you try the new project with CLI 8.0.0? That's the one variable I didn't try as I missed that in your post. This plugin here is probably special in that it has a plugin as a dependency - not many of the core plugins have that. |
@janpio yes, i tried it with cli 8.0.0 on the new project (worked). on the project where it breaks i tried with 8.0.0 and 8.1.2 - couldn't yet check 9+ since there's a hook which breaks due to requireCordovaModule('q') failing on the newer version. |
I had a similar issue today, but not with same version. i obtain the same stack for 'cordova prepare android' during plugin research :
changing to cordova-plugin-screen-orientation 3.0.2 solve the problem. |
Thanks @Stephane84, that is really strange. But at least we know it is not caused by the new version. What CLI version are you using? |
cordova prepare android
Failed to install 'cordova-plugin-screen-orientation': Error: Expected plugin to have ID "es6-promise-plugin" but got "cordova-plugin-screen-orientation".
on cordova prepare android
(I renamed the issue to reflect the problem better - this way we can keep it open and investigate further.) |
cordova CLI 8.0.0 node 6.9.5 |
Another try today, updating cordova-android from 6.4.0 to 8.0.0 I notice that this fix : #25 make my application turning on the other direction (left right inversed) than before (between 3.0.1 and 3.0.2) |
Could you please create a new issue for this? The PR was considered a bugfix, maybe this was not correct. But let's discuss this in a new issue. |
I'm experiencing the same error. Can be seen here: https://travis-ci.org/shesek/spark-wallet/builds/555012772 These are the configuration files: config.xml, package.json |
it seems that cordova only take the version specified in config.xml for the plugins, and not in package.json (nor package-lock.json) For my app, i found that version of cordova-plugin-screen-orientation was not the same beetween node_modules folder (npm) and plugins folder (cordova). Maybe there is a bug in this situation (i don't understand why). if you fixe the version everywhere (without ^ or ~) it seems to work again. Could you test it ? in package.json package-lock.json and config.json for 3.0.1 or 3.0.2 I don't remember all the tests i've done, but maybe, the order of the insctructions are importent during the build
maybe in the past i had different order like :
and this doesn't work If it helps someone... |
This is a cordova-cli issue, not plugin issue. Since all comments are using an old version if the CLI it might be fixed. |
This works for me: |
Bug Report
Problem
Since 3.0.2
cordova prepare android
leads to this error (at least for us):Setting the version to
3.0.1
fixes the problem for us.What is expected to happen?
cordova prepare android
/ plugin installation works without errors.What does actually happen?
The error above.
Command or Code
cordova prepare android
Environment, Platform, Device
Android, built on CircleCI
Version information
cordova-android@7.1.1
cordova-plugin-screen-orientation@^3.0.1
Checklist
The text was updated successfully, but these errors were encountered: