I'm trying to follow the Pebble C watchface tutorial, and I can get the time to display, but I can't get any weather information to show up. Looking at the logs, it appears that there is a fatal error immediately upon startup:
[INFO ] Enabling application logging...
[INFO ] Displaying logs ... Ctrl-C to interrupt.
[INFO ] Traceback (most recent call last):
File "/usr/local/Cellar/pebble-sdk/3.0/tools/pebblecomm/pebble.py", line 777, in _reader
self._ws_client.handle_response(endpoint, resp)
AttributeError: 'NoneType' object has no attribute 'handle_response'
[INFO ] <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'handle_response'
[ERROR ] Lost connection to Pebble
I even have a log message as the very first line of code in the main function, but it doesn't display:
int main(void) {
APP_LOG(APP_LOG_LEVEL_INFO, "Main.");
init();
app_event_loop();
deinit();
}
I'm also getting a concerning warning upon building that might be related:
/usr/local/Cellar/pebble-sdk/3.0/libexec/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Does anyone know what might be happening? The total lack of any logs makes me think that my watchface code is not related to the crash. I can post some code if requested, though.
EDIT: I tried again with another project, with all of the code copy-pasted from Pebble's tutorial source code. Same problem.
This isn't your fault. This is an issue with the commandline tool. Upgrading to the latest SDK should fix this.
brew update
brew upgrade pebble-sdk
Related
I recently updated my app.yaml from
runtime: go114
to
runtime: go115
because I was warned in an email that support for go114 was ending.
The service deployed fine but after it finished, I got the message:
Updating service [default]...â ¼WARNING: There is an indirect dependency on App Engine APIs, but they are not enabled in your app.yaml. You may see runtime errors trying to access these APIs. Set the app_engine_apis property.
So I added:
app_engine_apis: true
And now the service won't deploy and gives this error:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [<snip>/app.yaml]
Unexpected attribute 'app_engine_apis' for object of type AppInfoExternal.
Looks like a catch 22. How do I deal with this?
Posting this as community wiki as it's based on #Joel's comments.
It looks like this is being triggered, since those APIs aren't enabled yet in go115, you might get a runtime error.
I would say that you should probably reach out to Google Cloud either in their Issue Tracker system or open an Issue in this Github Page so that they can fix this issue, as there doesn't seem to be any workarounds for this one.
I received the above error when using the SwiftUI previews feature and can't figure out why this happens. The error always looks something like this:
GenericHumanReadableError: unexpected error occurred
messageRepliedWithError("Connecting to launched interactive agent 1894", Optional(Error Domain=com.apple.dt.xcodepreviews.service Code=17 "connectToPreviewHost: Failed to connect to 1894: (null)" UserInfo={NSLocalizedDescription=connectToPreviewHost: Failed to connect to 1894: (null)}))
I managed to figure out a good way to debug this, please see below
If you head into /Users/USERNAME/Library/Logs/DiagnosticReports you will see the latest crash reports. Open the most recent one (should start with your app name), and it should tell you the reason the app crashed. It'll look something like this:
Application Specific Information:
Fatal error: This request requires an authenticated account: file /Users/USERNAME/Work/AppName/Models/CloudKitAlbumManager.swift, line 101
In my case, it was a fatalError i threw in development for debugging. The previews loads your app and thus call your whole stack and will crash if you like me throws fatalErrors for debugging.
I hope this helps
I am using a local install of Playground on MacOS.
I was successful to create my business network, add my model file and logic to this network and create assets and participants instances.
So now I am ready to submit my first transaction, but I get an error message in the popup window as a result to my request. The message per se is not the problem (it's about some Undefined asset), my problem is I want to debug this transaction code by producing some execution traces, using old-school printf or log message.
I tried to insert console.log(message) instructions in my transaction code but eventually I was not able to retrieve those logs traces (eg. using a command like docker logs -f composer).
Is there another way to produce logs traces? Or did I miss a config setting to defilter logs in docker logs?
Any help greatly appreciated!
Olivier.
On console logging (and seeing them in the browser Developer console), see this Stack Overflow here (hyperledger composer playground) Can you see results of console.log('something') in browser? (it also has a link to more info there
See here https://hyperledger.github.io/composer/latest/problems/diagnostics.html for more on logging / where to find debug logs.
As for setting checkpoint/breakpoints: These are set by the Editor tooling 🙂 In H/Composer, you can just use the embedded connector (eg such as TP functions) to try out / step through each breakpoint - for more info on VSCode -> https://code.visualstudio.com/docs/editor/debugging and Atom -> How do I set a breakpoint inside of atom's package? and I posted the link to diagnostics/logging above.
One quick way I used to insert breakpoints with debug messages, is to throw an exception using throw new Error(...) in the transaction method.
This shows up in the playground interface as well.
I'm experimenting with the python-onvif library and command line client to work with a network camera I have.
When things are working it's fine, but in the event that I have an error, I get almost no useful information out of the thing.
For instance, if I use the wrong password to the cli, I end up with:
#onvif-cli devicemgmt GetCapabilities --host 192.168.0.149 -u admin -a wrongpw
False: Unknown error: (400, u'Bad Request')
That's the result of an Exception making it's way up from suds into python-onvif and being printed by the onvif-cli tool.
Tracing with wireshark shows that in fact the 400 response came back with a proper SOAP message indicating an auth failure.
A little debugging with pdb shows that the underlying 'suds' library seems to be simply eating that text and throwing the Exception. I attempted to use 'last_received()' in the suds client object to get the message, but it doesn't have the contents of the 400 - it has the last message the thing received correctly.
Is there any way for my code to get the contents of the 400 message? I'm happy to just get raw bytes - I just need something to log so that when things go bad in the field I can at least know what the camera thinks is happening.
I did try turning the 'faults' option to False in the creation of the suds.client.Client, but that just got me the (400, Bad Request) returned as a tuple - it still didn't decode the contents.
System is CentOS 6.6, suds version is 0.4, python-onvif 0.1.3, python 2.6.6, camera is a Sony EP580 with latest firmware.
I'm trying to port the Twitter Notifier extension to FF.
I'm not too familiar with JavaScript so I just used extension factory to convert it to FF.
Unfortunately it is not working; I don't get any HTML5 desktop notifications.
I've looked at the code a bit and I think the problem is with twitter.js which should be found in the path 'resources\extension-data\js'.
http://pastebin.com/C0NqU4Ur
First I've changed
twitter.messagesDB = window.webkitIndexedDB.open("messagesDB");
to
twitter.messagesDB = window.mozIndexedDB.open("messagesDB");
but it still is not working.
The error console also doesn't show any error.
When I put a console.log command to the twitter.messagesDB.onsuccess function nothing is being outputted to the error console.
Also no output when I create an onerror function.
So I though to surround the functions with a try and catch clause but no error is being thrown.
So I tried to put twitter.messagesDB = twitter.messagesDB.result; out of the function and the following error shows up in the error console:
Error: uncaught exception: [Exception... "A mutation operation was attempted on a database that did not allow mutations." code: "6" nsresult: "0x80660006 (NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR)" location: "chrome-extension://gjlehiopfilnaggndcmbhphaglkbkekf/js/twitter.js Line: 28"]
What does that mean?
How can I make it work in Firefox?
Thanks in advance!
Edit: I'm using Firefox 12 on Windows
This is due to an incompatibility between the Firefox implementation of IndexedDB, which supports the latest IndedexDB protocol published December 2011, and the Chrome implementation, which supports the version previous to that.
The breaking change is how databases are created, where the older (Chrome) implementation uses the setVersion transaction whereas the newer version (FF) uses an onupgradeneeded event and callback.
To see this change, please star this issue.