0

I'm developing my first scope, hoping to enter the scopes showdown contest.

I've decided to make a javascript scope. I'm having fun with the SDK and following along the javascript scopes tutorial at

https://developer.ubuntu.com/en/scopes/tutorials/developing-scopes-javascript/

I've also been reading other online documentation and API pages.

I'm running Ubuntu 15.10, with the ubuntu-sdk-ppa-team ppa enabled. I've followed the guides on installing the SDK, created my click targets, installed the javascript scopes dev tools... did everything by the book.

I've started developing my scope based on the default example for javascript scopes provided by the Ubuntu SDK.

My scope (which is a freesound scope, btw) is starting to work. It loads and runs just fine on the Desktop. Now I want to try it on my Aquaris phone, which has just been updated with the new OTA9.

When I run my scope with the ubuntu phone as a target, I get the following:

:-1: error: security:policy_groups_safe:freesound:debug: (REJECT) reserved policy group 'debug': not for production use

It seems the SDK adds some magic to my scope in order to run in DEBUG mode. However, the phone does not seem to like this.

Poking around in the Run settings for my project, I've found an option called Enable debug helper in the UbuntuSDK click build deploy step. If I disable this option the previous error goes away. Presumably, the precious debug information will also go away (I could not verify this, because there is another error further along).

After disabling the debug helper, I try to run my project again, in order to load it up into the phone. Now I get another error:

Using a custom scopelauncher is not yet supported

After this nothing else happens.

I noticed that the myscope/data/myscope.ini.in file it has the following line in the [ScopeConfig] section:

ScopeRunner=./node_modules/unity-js-scopes/bin/unity-js-scopes-launcher %S %R

Maybe this is the custom scoperunner that the error is referring to? I've tried deleting this line and re-running the project. It seems to work, as the SDK is finally able to upload my scope to the phone. However, even if the scope loaded, it does nothing.

Now I'm trying to run it again on the Desktop (without the scoperunner line that I've deleted from the scope ini file) and it also fails. This time I get some output:

scoperegistry: no remote registry configured, only local scopes will be available file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/1.2/ButtonStyle.qml:123:5: QML UbuntuShape: 'color' is deprecated. Use 'backgroundColor', 'secondaryBackgroundColor' and 'backgroundMode' instead. file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/1.2/ButtonStyle.qml:135:5: QML UbuntuShape: 'gradientColor' is deprecated. Use 'backgroundColor', 'secondaryBackgroundColor' and 'backgroundMode' instead. file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/1.2/ButtonStyle.qml:123:5: QML UbuntuShape: 'image' is deprecated. Use 'source' instead. file:///usr/share/unity8//ScopeTool.qml:139:23: Unable to assign null to QString User agent string: "plugin=0.5.5+15.10.20150924-0ubuntu1&release=15.10" Unable to add overview scope, can't find with ID: "scopes" Dispatching search: "freesound.rgsilva_freesound" "" "" scoperunner: unity::ResourceException: Cannot load scope freesound.rgsilva_freesound; tried in the following locations: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/libfreesound.rgsilva_freesound.so /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/freesound.rgsilva_freesound.so /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/scope.so /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/libfreesound.rgsilva_freesound.so /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/freesound.rgsilva_freesound.so /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/scope.so Exception history: Exception #1: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/libfreesound.rgsilva_freesound.so: cannot open shared object file: No such file or directory Exception #2: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/freesound.rgsilva_freesound.so: cannot open shared object file: No such file or directory Exception #3: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/x86_64-linux-gnu/scope.so: cannot open shared object file: No such file or directory Exception #4: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/libfreesound.rgsilva_freesound.so: cannot open shared object file: No such file or directory Exception #5: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/freesound.rgsilva_freesound.so: cannot open shared object file: No such file or directory Exception #6: unity::ResourceException: /home/ricardo/dev/build-freesound-Ubuntu_SDK_Desktop_Kit-Default/src/scope.so: cannot open shared object file: No such file or directory Caught an error from create_query(): unity::scopes::MiddlewareException: unity::ResourceException: RegistryObject::ScopeProcess::exec(): exec aborted. Scope: "freesound.rgsilva_freesound" took longer than 4000 ms to start.

So it seems the scoperunner line is needed in order for the scope to run, at least on the Desktop.

I'm at a lost here. How can I get my scope to run both on the desktop and on the phone?

1 Answer 1

1

thank you for participating to the showdown and sorry for the late reply,

  • you are correct about the 'Enable debug helper' option that can help if you face the first error report shown above,

  • the "Using a custom scopelauncher is not yet supported" message comes from QtCreator during the click packaging step and highlights a limitation of QtCreator at the moment when it is packaged with a debug script mode. This is serious issue though, and should not be a blocker as it is now, I am investigating the core issue and will post follow ups there,

*

EDIT A branch for the ubuntu sd ide that hasn't been merged yet fixes that

https://code.launchpad.net/~zeller-benjamin/qtcreator-plugin-ubuntu/js-scopes-support/+merge/285464

it should land very soon and put things back to a working order,

*

You need the custom scope launcher ScopeConfig line to be present in your config file though in order for the js scopes to run.

You can install the click package on the device though (after it has been built) by going in the "Publish" section of your QtCreator project and click the "Install on Device" button.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .