Skip to content

Instantly share code, notes, and snippets.

View yaronyg's full-sized avatar

Yaron Y Goland yaronyg

View GitHub Profile
@yaronyg
yaronyg / gist:e137d24d041686026f93
Created March 1, 2016 19:14
Crashing on nexus 6
03-01 11:13:11.270 9307-12165/? E/native﹕ :0 Recognition context compiler error: RecognitionContext not supported:
request_context {
type: DYNAMIC_CLASS
dynamic_class_context {
class_type: APP_NAME
instance {
value: "Gmail"
}
instance {
value: "Maps"
03-01 11:08:27.354 10476-10476/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: org.thaliproject.nativetest.app, PID: 10476
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {org.thaliproject.nativetest.app/org.thaliproject.nativetest.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.AlertDialog.dismiss()' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:3988)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4038)
at android.app.ActivityThread.access$1400(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1443)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:168)
> thali-cordova-plugin-jxcore@1.0.0 test-coordinated /Users/yarongoland/Desktop/depots/Thali_CordovaPlugin/test/www/jxcore
> jx runCoordinatedTests.js
2016-02-24T06:25:01.095Z - info: listening on *:3000
Instance 2:
Unit Test app is loaded
@yaronyg
yaronyg / gist:85bd5346fc79a30865d0
Created February 24, 2016 01:32
Failed android load
02-23 17:30:55.172 3413-3413/com.test.thalitest I/art﹕ Late-enabling -Xcheck:jni
02-23 17:30:55.293 3413-3413/com.test.thalitest I/WebViewFactory﹕ Loading com.google.android.webview version 44.0.2403.117 (code 246011700)
02-23 17:30:55.317 3413-3413/com.test.thalitest W/System﹕ ClassLoader referenced unknown path: /system/app/WebViewGoogle/lib/arm
02-23 17:30:55.324 3413-3413/com.test.thalitest I/LibraryLoader﹕ Time to load native libraries: 2 ms (timestamps 6427-6429)
02-23 17:30:55.324 3413-3413/com.test.thalitest I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
02-23 17:30:55.346 3413-3413/com.test.thalitest V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1) {819c449}
02-23 17:30:55.346 3413-3413/com.test.thalitest I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
02-23 17:30:55.346 3413-3413/com.test.thalitest I/chromium﹕ [INFO:library_loader_hooks.
@yaronyg
yaronyg / objectIndex.js
Created February 22, 2016 20:26
Javascript can distinguish between instances of the same object
function foo () {
}
var foo1 = new foo();
var foo2 = new foo();
var foo3 = new foo();
// Property names have to be a string and so indexing on objects causes problems
var objectHolder = {};
@yaronyg
yaronyg / CombinedResult.js
Created February 1, 2016 19:22
How to return a single result from both methods
var thaliMobileNativeWrapper = {};
var Promise = require('lie');
var thaliWifiInfrastructure = {};
// Simulating success
thaliMobileNativeWrapper.stopListeningForAdvertisements = function() {
return Promise.resolve('native');
};
@yaronyg
yaronyg / thaliNotificationBeacons
Created January 27, 2016 22:54
Got rid of base 64 where appropriate
"use strict";
/** @module thaliNotificationBeacons */
/*
Matt: Please make sure to see if you can find Srikanth's code in Node and of
course you can look at the Java source code and tests linked to in the spec, the
latest version of which is at
https://github.com/thaliproject/thali/blob/yaronyg-patch-4/presenceprotocolforop
portunisticsynching.md
@yaronyg
yaronyg / test.js
Created November 4, 2015 02:25
Test for wrong count by Express-PouchDB
"use strict";
var PouchDB = require("pouchdb");
var Promise = require('lie');
var express = require('express');
function startExpress(port) {
return new Promise(function(resolve, reject) {
var app = express();
app.use('/', require('express-pouchdb')(PouchDB));
@yaronyg
yaronyg / gist:09b1fc43bc89a714142d
Created October 14, 2015 03:14
Stack from phone 2 that had SIGABRT
2015-10-13 20:11:31.231 ThaliTest[1905:2169627] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/B532E67A-D95A-48B9-94A7-0B203F721827/Library/Cookies/Cookies.binarycookies
2015-10-13 20:11:31.266 ThaliTest[1905:2169627] Apache Cordova native platform version 3.8.0 is starting.
2015-10-13 20:11:31.267 ThaliTest[1905:2169627] Multi-tasking -> Device: YES, App: YES
2015-10-13 20:11:31.273 ThaliTest[1905:2169627] Unlimited access to network resources
2015-10-13 20:11:31.278 ThaliTest[1905:2169627]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
@yaronyg
yaronyg / gist:4157e8298e30ee9a70af
Created October 14, 2015 03:04
Log from Phone 2
2015-10-13 19:47:57.563 ThaliTest[1899:2166045] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/B671F906-E1FF-4A4B-BE73-F664C1A0789B/Library/Cookies/Cookies.binarycookies
2015-10-13 19:47:57.599 ThaliTest[1899:2166045] Apache Cordova native platform version 3.8.0 is starting.
2015-10-13 19:47:57.600 ThaliTest[1899:2166045] Multi-tasking -> Device: YES, App: YES
2015-10-13 19:47:57.605 ThaliTest[1899:2166045] Unlimited access to network resources
2015-10-13 19:47:57.611 ThaliTest[1899:2166045]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/