Parsing error while using yelp scope

Bug #1580493 reported by Penk Chen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Yelp Scope
Invalid
High
Unassigned

Bug Description

I have com.canonical.scopes.yelp 1.5 installed on rc-proposed channel, and it doesn't display any data whether using fake location or not, in scope-registry.log I see following error:

2016/05/11 15:22:51 Starting yelp scope
aa_getcon failed, errno = 13
warning: ignoring unknown key background in group Appearance in file /home/phablet/.local/share/unity-scopes//com.canonical.scopes.yelp_yelp_1.5/com.canonical.scopes.yelp_yelp.ini
[2016-05-11 07:22:51.296] INFO: Registry: RegistryObject::ScopeProcess::exec(): Process for scope: "com.canonical.scopes.yelp_yelp" started
2016/05/11 15:22:51 http://api.geonames.org/findNearbyWikipediaJSON?lang=en&lat=25.04&lng=121.53&username=unityapi
[2016-05-11 15:22:51.455] ERROR: com.canonical.scopes.yelp_yelp: ReplyImpl::error(): invalid character '<' looking for beginning of value
[2016-05-11 15:22:51.505] ERROR: com.canonical.scopes.yelp_yelp: ReplyImpl::error(): invalid character '<' looking for beginning of value
query complete, status: error

: invalid character '<' looking for beginning of value
query complete, status: error

: invalid character '<' looking for beginning of value

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

I just installed yelp 1.5 and did not see this on:

channel: ubuntu-touch/rc-proposed/bq-aquaris-pd.en
last update: 2016-05-10 15:44:25
version version: 45

I think the issue is that the http request is assumed to return json. If yelp returns HTML then the decoding into a struct fails and that error is not handled:
http://bazaar.launchpad.net/~yelp-scope-team/yelp-scope/trunk/view/head:/src/yelp.go#L192

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Since this is intermitant and has existed all along, I'll set to High

Changed in yelp-scope:
importance: Undecided → High
Revision history for this message
Zhang Enwei (zhangew401) wrote :

I met this issue while implementing the new Yelp API V3, and I reported error to Yelp team.
https://github.com/Yelp/yelp-api-v3/issues/37

Revision history for this message
Zhang Enwei (zhangew401) wrote :

This error is solved by Yelp. I tested thousands of times while testing lp:1626381, it never happen.

Changed in yelp-scope:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.