Code Monkey home page Code Monkey logo

cordova-plugin-chrome-apps-identity's People

Contributors

agrieve avatar clelland avatar jpchase avatar kamrik avatar mmocny avatar mwoghiren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-chrome-apps-identity's Issues

Cannot build android with cca using the com.google.cordova.admob plugin and chrome.identity

Im opening this issue here as well, since I got no answer by the admob plugin developer yet. Issue link

Im a using google cca to build a cordova app, but after adding the chrome.identity Plugin and Cordova admob pro, I cant build the app anymore. The terminal error says: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/andr
oid/gms/actions/ReserveIntents;
(Full error log below)

System Details
Windows
cca v0.7.0
If you need anything else please let me know.

Replication Steps

  1. Install cca
  2. In a terminal: cca create app
  3. cd app
  4. cca platform add android
  5. Open app/www/manifest.json and in the permissions array add: identity e.g. "permissions": ["<all_urls>", "identity"]
  6. cca build android Builds fine.
  7. cca plugin add com.google.cordova.admob
  8. cca build android Fails

Full error log from terminal

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexArmv7Debug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        C:\Users\TsoumiAc\AppData\Local\Android\android-sdk\build-tools\22.0.1\d
x.bat --dex --no-optimize --output C:\Users\TsoumiAc\Desktop\app\platforms\andro
id\build\intermediates\dex\armv7\debug --input-list=C:\Users\TsoumiAc\Desktop\ap
p\platforms\android\build\intermediates\tmp\dex\armv7\debug\inputList.txt
Error Code:
        2
Output:

        UNEXPECTED TOP-LEVEL EXCEPTION:
        com.android.dex.DexException: Multiple dex files define Lcom/google/andr
oid/gms/actions/ReserveIntents;
                at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.ja
va:596)
                at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:
554)
                at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:
535)
                at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)

                at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
                at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main
.java:454)
                at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
                at com.android.dx.command.dexer.Main.run(Main.java:246)
                at com.android.dx.command.dexer.Main.main(Main.java:215)
                at com.android.dx.command.Main.main(Main.java:106)



* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 24.141 secs

C:\Users\TsoumiAc\Desktop\app\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "C:\Users\TsoumiAc\Desktop\app\pl
atforms\android\gradlew cdvBuildDebug -b C:\Users\TsoumiAc\Desktop\app\platforms
\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: C:\Users\TsoumiAc\Desktop\app\platfo
rms\android\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: C:\Users\TsoumiAc\Desktop\app\platforms\android\cordova\build.bat: Comman
d failed with exit code 1
    at ChildProcess.whenDone (C:\Users\TsoumiAc\AppData\Roaming\npm\node_modules
\cca\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131
:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

Android no Play-store fallback & change/logout user

Hello there,
First thanks for the plugin!

In the case the Play-store in not present, the fallback is used, no problem there.

However I cannot figure out how to switch or logout user.

The flow:

  1. Authenticate the user A: chrome.identity.getAuthToken -> Ok you can enter you user credentials
  2. logout: chrome.identity.removeCachedAuthToken -> seams remove the token.
  3. Launch the authentication flow again to change the user: chrome.identity.getAuthToken -> Fail : Same user token get retrieved without prompt the user credentials

Edit: I just found the following lines in the plugin code:

if ("removeCachedAuthToken".equals(action)) {
callDetails.token = args.getString(0);
callDetails.signOut = args.getBoolean(1);

..
and
exec(callback, null, 'ChromeIdentity', 'removeCachedAuthToken', [details.token, details.signOut]);

I am going to test details.signOut..
Please add a line in your doc about it.. as the chrome doc don't mentioned it.
https://developer.chrome.com/apps/identity#method-removeCachedAuthToken

Cheers!

In IOS 10 this plugin asks for usage of the photo library unnecessarily

Because of its dependence on cordova-plugin-google-plus-ios this app references the following frameworks

    <framework src="GooglePlus.framework" custom="true" />
    <framework src="AddressBook.framework" />
    <framework src="AssetsLibrary.framework" />
    <framework src="Foundation.framework" />
    <framework src="CoreLocation.framework" />
    <framework src="CoreMotion.framework" />
    <framework src="CoreGraphics.framework" />
    <framework src="CoreText.framework" />
    <framework src="MediaPlayer.framework" />
    <framework src="Security.framework" />
    <framework src="SystemConfiguration.framework" />

I believe this is causing an issue with ios app submission- even though my app does not ask for permission for the photo library, it is being rejected with the following note

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

chrome.identity.removeCachedAuthToken broken

chrome.identity.removeCachedAuthToken never seems to finish. Callback function is never called.
Other chrome identity functions appear to be working (getAuthToken is fine). No related output appears to be in the log file either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.