{"action":"created","issue":{"url":"https://api.github.com/repos/vanadium/issues/issues/1328","repository_url":"https://api.github.com/repos/vanadium/issues","labels_url":"https://api.github.com/repos/vanadium/issues/issues/1328/labels{/name}","comments_url":"https://api.github.com/repos/vanadium/issues/issues/1328/comments","events_url":"https://api.github.com/repos/vanadium/issues/issues/1328/events","html_url":"https://github.com/vanadium/issues/issues/1328","id":154785088,"number":1328,"title":"Discovery: Advertisement with visibility crashes due to lack of crypter (Java)","user":{"login":"afandria","id":2432033,"avatar_url":"https://avatars.githubusercontent.com/u/2432033?v=3","gravatar_id":"","url":"https://api.github.com/users/afandria","html_url":"https://github.com/afandria","followers_url":"https://api.github.com/users/afandria/followers","following_url":"https://api.github.com/users/afandria/following{/other_user}","gists_url":"https://api.github.com/users/afandria/gists{/gist_id}","starred_url":"https://api.github.com/users/afandria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afandria/subscriptions","organizations_url":"https://api.github.com/users/afandria/orgs","repos_url":"https://api.github.com/users/afandria/repos","events_url":"https://api.github.com/users/afandria/events{/privacy}","received_events_url":"https://api.github.com/users/afandria/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jhahn21","id":9577539,"avatar_url":"https://avatars.githubusercontent.com/u/9577539?v=3","gravatar_id":"","url":"https://api.github.com/users/jhahn21","html_url":"https://github.com/jhahn21","followers_url":"https://api.github.com/users/jhahn21/followers","following_url":"https://api.github.com/users/jhahn21/following{/other_user}","gists_url":"https://api.github.com/users/jhahn21/gists{/gist_id}","starred_url":"https://api.github.com/users/jhahn21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhahn21/subscriptions","organizations_url":"https://api.github.com/users/jhahn21/orgs","repos_url":"https://api.github.com/users/jhahn21/repos","events_url":"https://api.github.com/users/jhahn21/events{/privacy}","received_events_url":"https://api.github.com/users/jhahn21/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-13T19:35:29Z","updated_at":"2016-05-14T01:52:09Z","closed_at":null,"body":"Spoke with @jhahn21 and it looks like we need to initialize discovery with a crypter or something.\r\n\r\nError Message:\r\n\r\n```\r\n05-13 11:04:56.041 15214-0/io.v.todos.syncbase E/Go: panic: runtime error: invalid memory address or nil pointer dereference\r\n05-13 11:04:56.041 15214-0/io.v.todos.syncbase E/Go: [signal 0xb code=0x1 addr=0x0 pc=0x9cd21f84]\r\n05-13 11:04:56.041 15214-0/io.v.todos.syncbase E/Go: goroutine 17 [running, locked to thread]:\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: panic(0x9d3c6998, 0x8c400038)\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/.jiri_root/profiles/v23/go/shared/1.6/src/runtime/panic.go:464 +0x370\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: v.io/x/ref/lib/security/bcrypter.(*Crypter).Encrypt(0x0, 0x8c858c60, 0x8c551490, 0x6c, 0x8ca1c580, 0x20, 0x20, 0x0, 0x0, 0x0)\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/ref/lib/security/bcrypter/crypter.go:107 +0x220\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: v.io/x/ref/lib/discovery.wrapSharedKey(0x8c858c60, 0x76e43aef, 0xe939b778, 0x6f22c15d, 0x67e848c0, 0x9b4f2287, 0x37c2ed08, 0xafb54b6f, 0x4fe5c141, 0x8c551490, ...)\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/ref/lib/discovery/cipher.go:115 +0xc0\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: v.io/x/ref/lib/discovery.encrypt(0x8c858c60, 0x8ca673e0, 0x8ca1c380, 0x3, 0x3, 0x0, 0x0)\r\n05-13 11:04:56.042 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/ref/lib/discovery/cipher.go:45 +0x1e8\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: v.io/x/ref/lib/discovery.(*idiscovery).advertise(0x8c4640a0, 0x8c858c60, 0x2, 0x0, 0x8c4a83f0, 0x8ca1c380, 0x3, 0x3, 0x8c7d8210, 0x0, ...)\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/ref/lib/discovery/advertise.go:33 +0x1e0\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: v.io/x/ref/lib/discovery.(*sdiscovery).Advertise(0x8c89dd40, 0x8c858c60, 0x8c4a83f0, 0x8ca1c380, 0x3, 0x3, 0x0, 0x0, 0x0)\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/ref/lib/discovery/session.go:23 +0x68\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: v.io/x/jni/impl/google/discovery.Java_io_v_impl_google_lib_discovery_DiscoveryImpl_nativeAdvertise(0x78b22840, 0x6d67b47c, 0xb6, 0x0, 0x6d67b480, 0x6d67b484, 0x6d67b488, 0x6d67b48c)\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: \t/usr/local/google/home/alexfandrianto/Documents/vanadium_root/release/go/src/v.io/x/jni/impl/google/discovery/jni.go:130 +0x30c\r\n05-13 11:04:56.043 15214-0/io.v.todos.syncbase E/Go: v.io/x/jni/impl/google/discovery._cgoexpwrap_b6b7994eabee_Java_io_v_impl_google_lib_discovery_DiscoveryImpl_nativeAdvertise(0x78b22840, 0x6d67b47c, 0xb6, 0x0, 0x6d67b480, 0x6d67b484, 0x6d67b488, 0x6d67b48c)\r\n05-13 11:04:56.044 15214-0/io.v.todos.syncbase E/Go: \t??:0 +0x54\r\n```\r\n\r\nIssues:\r\n- the error message is opaque. The real problem is that crypter was nil (the line that failed was `c.mu.RLock()`, but the error should be caught much earlier.\r\n- We need to initialize a crypter; how do we do that? Is this documented?\r\n\r\n@asadovsky @aghassemi This must be solved before we can implement private sharing with Syncbase.\r\n\r\nThe short-term workaround for TODOs will be to advertise publicly but add attributes that the scanner and advertiser can filter on. @AsturaPhoenix "},"comment":{"url":"https://api.github.com/repos/vanadium/issues/issues/comments/219194222","html_url":"https://github.com/vanadium/issues/issues/1328#issuecomment-219194222","issue_url":"https://api.github.com/repos/vanadium/issues/issues/1328","id":219194222,"user":{"login":"afandria","id":2432033,"avatar_url":"https://avatars.githubusercontent.com/u/2432033?v=3","gravatar_id":"","url":"https://api.github.com/users/afandria","html_url":"https://github.com/afandria","followers_url":"https://api.github.com/users/afandria/followers","following_url":"https://api.github.com/users/afandria/following{/other_user}","gists_url":"https://api.github.com/users/afandria/gists{/gist_id}","starred_url":"https://api.github.com/users/afandria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afandria/subscriptions","organizations_url":"https://api.github.com/users/afandria/orgs","repos_url":"https://api.github.com/users/afandria/repos","events_url":"https://api.github.com/users/afandria/events{/privacy}","received_events_url":"https://api.github.com/users/afandria/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T01:52:09Z","updated_at":"2016-05-14T01:52:09Z","body":"Thanks for fixing the error message. How do we initialize the crypter in Go and Java?"}}