[CrashManager] testcase_ext given without testcase
Traceback observed during operation:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/viewsets.py", line 103, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py", line 483, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py", line 443, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py", line 480, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/mixins.py", line 21, in create
self.perform_create(serializer)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/mixins.py", line 26, in perform_create
serializer.save()
File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py", line 214, in save
self.instance = self.create(validated_data)
File "./crashmanager/serializers.py", line 110, in create
return super(CrashEntrySerializer, self).create(attrs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py", line 957, in create
raise TypeError(msg)
TypeError: Got a `TypeError` when calling `CrashEntry.objects.create()`. This may be because you have a writable field on the serializer class that is not a valid argument t
o `CrashEntry.objects.create()`. You may need to make the field read-only, or override the CrashEntrySerializer.create() method to handle this correctly.
Original exception was:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py", line 940, in create
instance = ModelClass.objects.create(**validated_data)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 392, in create
obj = self.model(**kwargs)
File "./crashmanager/models.py", line 235, in __init__
super(CrashEntry, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 573, in __init__
raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
TypeError: 'testcase_ext' is an invalid keyword argument for this function
I think the fix will be simply clearing testcase_ext in the case when no testcase is given, but I'm not sure how this is actually happening if Collector.submit() is being used.
This happened because of bug 1543208 where the testcase was empty (or even no testcase at all).
Usually the harness uses Collector.submit(), but for manual testing and reporting I had used Collector.Collector --submit. In this case, the testcase was just an empty file or an empty file with merely whitespace.
I saw that the reporting mechanism "hung" but I guess it was because the server side crashed according to the stack in your comment above.
OK, so I guess an empty file is treated as a testcase to be submitted by Collector, but then detected as not a testcase by the server (but having testcase fields like testcase_ext). That makes sense. Thanks!