Closed Bug 855671 Opened 12 years ago Closed 12 years ago

[traceback] browser not parsed correctly

Categories

(Input Graveyard :: Submission, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

(Whiteboard: u=dev c=general p= s=input.2013q2)

Traceback (most recent call last): File "/data/www/input.mozilla.org/input/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 214, in feedback_router return view(request, *args, **kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 165, in android_about_feedback response, form = _handle_feedback_post(request) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 69, in _handle_feedback_post opinion.save() File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/models/base.py", line 463, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/models/base.py", line 551, in save_base result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/models/manager.py", line 203, in _insert return insert_query(self.model, objs, fields, **kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/models/query.py", line 1593, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/models/sql/compiler.py", line 912, in execute_sql cursor.execute(sql, params) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/db/backends/mysql/base.py", line 114, in execute return self.cursor.execute(query, args) File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue IntegrityError: (1048, "Column 'browser' cannot be null") User agent is this: 'HTTP_USER_AGENT': 'Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Xoom Build/IMM76) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30'
Here's another one: 'HTTP_USER_AGENT': 'Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
Another one: 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)',
Different traceback, but related issue: Traceback (most recent call last): File "/data/www/input.mozilla.org/input/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 214, in feedback_router return view(request, *args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 39, in _requires_firefox return func(request, *args, **kwargs) File "/data/www/input.mozilla.org/input/vendor/lib/python/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, *args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 116, in desktop_stable_feedback response, form = _handle_feedback_post(request) File "/data/www/input.mozilla.org/input/fjord/feedback/views.py", line 51, in _handle_feedback_post platform += ' ' + request.BROWSER.platform_version TypeError: cannot concatenate 'str' and 'NoneType' objects 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 (.NET CLR 3.5.30729)',
Here's another one: IntegrityError: (1048, "Column 'browser' cannot be null") 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',
Here's another one: TypeError: cannot concatenate 'str' and 'NoneType' objects 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 GTB7.1 ( .NET CLR 3.5.30729; .NET4.0C) FBSMTWB',
PR for "TypeError: cannot concatenate 'str' and 'NoneType' objects": https://github.com/mozilla/fjord/pull/81
"TypeError: cannot concatenate 'str' and 'NoneType' objects" fix landed in master in https://github.com/mozilla/fjord/commit/9730722
I pushed out 9730722 to production just now. I'm going to mark this as FIXED. If I get more errors, I'll reopen.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reopening because I got another today: GET:<QueryDict: {u'happy': [0]}>, POST:<QueryDict: {u'device': [u'Nexus 4'], u'_type': [u'2'], u'description': [u'I want to see new tabs as I open them. Needed addon called Phony to see Google news properly. No Ghostery addon. '], u'manufacturer': [u'LGE']}>, 'HTTP_USER_AGENT': 'Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', 'SERVER_NAME': 'm.input.mozilla.org', The _type stuff and SERVER_NAME makes it look like it's Firefox for Android, but that's not a Firefox user agent. This person mentions addons--maybe he/she is using a user agent addon? I'll look into it tomorrow.
Assignee: nobody → willkg
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Here's another one: 'HTTP_USER_AGENT': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3', None of these have REFERER set and they're sending POST data that's unique to Firefox for Android so I'm fairly sure they're coming from Firefox for Android. Margaret: Is it possible for someone using Firefox for Android to change the user agent possibly with an addon and then when they submit feedback with about:feedback, it's sending that changed user agent and not the Firefox for Android user agent?
Bingo! I can reproduce this by installing the phony addon and trying to submit feedback. I haven't a clue what to do about this. With the phony addon, we're getting phony user agents, so the data isn't very helpful. The user doesn't see any errors, so this isn't high priority to fix.
Putting these in my queue for this quarter.
Whiteboard: u=dev c=general p= s=input.2013q2
I'm going to talk to Cheng about what to do here. I think I want to introduce an "unknown browser" and just throw these under that.
Cheng: We have this problem where Firefox for Android users have the Phony addon installed and are thus reporting feedback with a phony user agent such that it kicks up an http 500 error on the site (that the user doesn't see) and we don't capture any feedback. I see two options: 1. tweak the code so if the user agent isn't a firefox user agent, we just ignore the feedback 2. tweak the code so that we have a bucket for "unknown browser" and put these in that Which is more useful?
Flags: needinfo?(cwwmozilla)
Unknown browser.
Flags: needinfo?(cwwmozilla)
Deployed to stage. Tested it and it works great. Deployed to prod. I'm going to close this out. I'll check tomorrow to see if we have any Unknowns, yet.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.