scottdermott / cordova-plugin-discovery

Cordova Service Discovery Plugin for Android & iOS
MIT License
31 stars 30 forks source link

Uncaught exception #5

Closed arjunmenon closed 7 years ago

arjunmenon commented 7 years ago

I am getting this error

serviceDiscovery.js:7 Uncaught SyntaxError: Unexpected token ;
cordova.js:1297 Uncaught Error: Module com.scott.serviceDiscovery.serviceDiscovery does not exist.
    addEntry @ cordova.js:1297
    exports.clobbers @ cordova.js:1307
    onScriptLoadingComplete @ cordova.js:1551
    scriptLoadedCallback @ cordova.js:1584
    (anonymous function) @ cordova.js:1538
(index):105 deviceready has not fired after 5 seconds.
(index):105 Channel not fired: onPluginsReady
(index):105 Channel not fired: onCordovaReady

Following your setup instructions.

scottdermott commented 7 years ago

Looks like there was a merge error. Fixed the JavaScript error. Should be fixed now

arjunmenon commented 7 years ago

Hey Is this error part of the plugin?

~/phone/testing3$ phonegap run android
[phonegap] executing 'cordova run android ' ...
ANDROID_HOME=/home/arjun/Android/Sdk

JAVA_HOME=/usr/lib/jvm/java-8-oracle

Subproject Path: CordovaLib

Incremental java compilation is an incubating feature.

:preBuild 
UP-TO-DATE

:preDebugBuild

UP-TO-DATE

:checkDebugManifest

:CordovaLib:preBuild UP-TO-DATE

:CordovaLib:preDebugBuild 
UP-TO-DATE

:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

UP-TO-DATE

:CordovaLib:compileDebugNdk
 UP-TO-DATE

:CordovaLib:compileLint
 UP-TO-DATE

:CordovaLib:copyDebugLint
 UP-TO-DATE
:CordovaLib:mergeDebugShaders

UP-TO-DATE
:CordovaLib:compileDebugShaders
 UP-TO-DATE

:CordovaLib:generateDebugAssets
 UP-TO-DATE

:CordovaLib:mergeDebugAssets

UP-TO-DATE

:CordovaLib:mergeDebugProguardFiles

UP-TO-DATE

:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:compileDebugRenderscript

UP-TO-DATE
:CordovaLib:generateDebugResValues

UP-TO-DATE

:CordovaLib:generateDebugResources

UP-TO-DATE

:CordovaLib:packageDebugResources

UP-TO-DATE

:CordovaLib:processDebugManifest

UP-TO-DATE

:CordovaLib:generateDebugBuildConfig

UP-TO-DATE

:CordovaLib:processDebugResources
/home/arjun/Android/Sdk/build-tools/25.0.1/aapt: 3: /home/arjun/Android/Sdk/build-tools/25.0.1/aapt: Syntax error: Unterminated quoted string

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* 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: 37.291 secs

Error: /home/arjun/phone/testing3/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/arjun/Android/Sdk/build-tools/25.0.1/aapt: 3: /home/arjun/Android/Sdk/build-tools/25.0.1/aapt: Syntax error: Unterminated quoted string

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

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

Was getting the same error even before you fixed the JS. It still persists. What does it mean? How can it be fixed?

scottdermott commented 7 years ago

Tested with $ cordova -version = 6.4.0 Try using Cordova instead of PhoneGap

arjunmenon commented 7 years ago

You know I was able to successfully embed this in TabrisJS. Had to custom build the app to support this plugin and after that it started showing uuids of discovered devices.

Now to further the development, would I simply need to pass the url maybe to a upnp plugin. I tired it but it wont work.

You know there are lot of hashes displayed in the console even for one device I had turned on. For multiple upnp devices there will be many hashes. Now which one is to be used to connect it and control playback?