Giter Club home page Giter Club logo

Comments (17)

tsubik avatar tsubik commented on July 20, 2024

I have no idea why you are having this error. Any other error logs?

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

Any of this help?

GeofencePlugin - GeoNotifications table was created successfully
GeofencePlugin - GeoNotificationManager init
GeofencePlugin - Location services enabled
ERROR: Method 'deviceready:' not defined in Plugin 'GeofencePlugin'

-[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"INVALID",
"GeofencePlugin",
"deviceready",
[

]
]
THREAD WARNING: ['PushPlugin'] took '25.395996' ms. Plugin should use a background thread.
enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.
active
didChangeAuthorizationStatus
didChangeAuthorizationStatus: 3 => AuthorizationStatusAuthorized
Converted locationManager:didChangeAuthorizationStatus: into didChangeAuthorizationStatus
[DOM] _onDelegateCallback() {"eventType":"didChangeAuthorizationStatus","status":"AuthorizationStatusAuthorized"}
[DOM] _mapDelegateCallback() found eventType didChangeAuthorizationStatus
[DOM] DEFAULT didChangeAuthorizationStatus()
active
THREAD WARNING: ['Geolocation'] took '27.729004' ms. Plugin should use a background thread.
THREAD WARNING: ['FileTransfer'] took '21.376953' ms. Plugin should use a background thread.
GeofencePlugin - GeoNotificationManager addOrUpdate

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

Nope :/. Are you trying this on device or simulator? Test if example application works for you.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

Testing on an iPad mini. I'll try the test app and see if I have the same issue. Thanks.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

So I cloned the example app, and when I add the ios platform, it fails with this error:

Installing "com.google.playservices" for ios
Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/ionic-geofence/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/ionic-geofence/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20

Perhaps my cordova install is missing something...

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

Have you run npm install before?

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

Yes, I ran npm install -g cordova ionic

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

Hmm, there are always problems with installing packages globally. I think you should also install npm install -g plugman

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

Actually plugman is not needed. Sorry. Try to run just npm install . I need to upgrade manual.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

Yeah, I tried both, but still get the same error.

Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'

from cordova-plugin-geofence.

lcoling avatar lcoling commented on July 20, 2024

I've been trying to fix this problem all day and just figured it out. This problem happens in Cordova 5.0, it seems like the platforms script has been broken out into 1 js file per platform.

These changes in hooks/add_swift_support.js is what fixed my problem:

  1. in line 18, change the module path to 'cordova-lib/src/plugman/platforms/ios'
  2. in line 24, change "platforms['ios'].parseProjectFile(iosPlatformPath)" to "platforms.parseProjectFile(iosPlatformPath)"

Should install properly then.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

I recently updated to OS X Yosemite, and I think it's causing some issues. NPM seems to be completely broken. So, once I get these other issues worked out, I'll get back to you and let you know if these fixes work.

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

@lcoling thanks. I will look at cordova 5.0 and try to make plugin compatible with it. @graphicgeek it is always good practice to install npm packages locally only, then you will use proper packages versions after npm install.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

Ok, so I got NPM reinstalled and working. It seems it may be a Cordova 5.0 issue. @lcoling's suggestion worked to get the example app working.

I created a blank cordova app (cordova create hello com.example.hello "HelloWorld"), added the ios platform, and then when I add the geofence plugin I get this:

Fetching plugin "https://github.com/cowbell/cordova-plugin-geofence" via git clone
Installing "com.cowbell.cordova.geofence" for ios
Fetching plugin "https://github.com/vstirbu/PromisesPlugin.git" via git clone
Installing "com.vladstirbu.cordova.promise" for ios
WARNING: android.support.v4 has been renamed to cordova-plugin-android-support-v4. You may not be getting the latest version! We suggest you cordova plugin rm android.support.v4 and cordova plugin add cordova-plugin-android-support-v4.
Fetching plugin "android.support.v4" via cordova plugins registry
Installing "android.support.v4" for ios
WARNING: com.google.playservices has been renamed to cordova-plugin-googleplayservices. You may not be getting the latest version! We suggest you cordova plugin rm com.google.playservices and cordova plugin add cordova-plugin-googleplayservices.
Fetching plugin "com.google.playservices" via cordova plugins registry
Installing "com.google.playservices" for ios
Failed to install 'com.cowbell.cordova.geofence':Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Context.requireCordovaModule (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
Error: Cannot find module 'cordova-lib/src/plugman/platforms'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Context.requireCordovaModule (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at run (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:18:33)
at module.exports (/Users/station5/Projects/phonegap/hello/plugins/com.cowbell.cordova.geofence/hooks/add_swift_support.js:13:5)
at runScriptViaModuleLoader (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/Cellar/node010/0.10.38_1/libexec/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20

from cordova-plugin-geofence.

lcoling avatar lcoling commented on July 20, 2024

I've just submitted a pull request which handles the pre-5.0 and 5.0 cordova cases.

from cordova-plugin-geofence.

graphicgeek avatar graphicgeek commented on July 20, 2024

I finally figured out what was causing this. In the parameters object I was passing to the addOrUpdate method, my latitude and longitude were strings instead of floats. I converted these to floats, and viola.

from cordova-plugin-geofence.

tsubik avatar tsubik commented on July 20, 2024

Thanks for update. Looks like debugging swift code is a disaster. Error message doesn't say anything useful.

from cordova-plugin-geofence.

Related Issues (20)

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.