Upload test report to C3 failed

Bug #1585556 reported by Scott Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Critical
Pierre Equoy

Bug Description

Steps to reproduce:
1) Try to submit report several times by following command
checkbox-submit /home/u/.local/share/plainbox/submission.xml --secure_id a00D000000gYLuBIAW --url https://certification.canonical.com/submissions/submit/

Actual Result:
C3 always show "This submission is being processed. Please continue to refresh the page until the submission information page appears."
https://certification.canonical.com/submissions/status/21557
https://certification.canonical.com/submissions/status/21560
https://certification.canonical.com/submissions/status/21562

Other info:
1. SKU: VEG5-DVT1-C1
2. BIOS: 00.02.02
3. Manifest: xenial-xenial-master-X05

Related branches

Revision history for this message
Scott Hu (huntu207) wrote :
tags: added: ce-qa-concern
Revision history for this message
Scott Hu (huntu207) wrote :
description: updated
summary: - Upload test report failed
+ Upload test report to C3 failed
Revision history for this message
Scott Hu (huntu207) wrote :

Another device encountered this symptom again

1. SKU: VEG5-DVT1-C2
2. BIOS: 00.02.02
3. Manifest: xenial-xenial-master-X05

https://certification.canonical.com/submissions/status/21581
https://certification.canonical.com/submissions/status/21583

Scott Hu (huntu207)
Changed in checkbox-ng:
importance: Undecided → Critical
Revision history for this message
Scott Hu (huntu207) wrote :

A device encountered this symptom again

1. SKU: GAB-DVT1-MT-01
2. BIOS: 0.7.0
3. Manifest: dell-bto-xenial-tahoe-gambit-apl-X12-iso-20160613-1

https://certification.canonical.com/submissions/status/21860
https://certification.canonical.com/submissions/status/21866

Revision history for this message
Scott Hu (huntu207) wrote :

Another device encountered this symptom again

1. SKU: GAIT7-DVT2-C3
2. BIOS: 0.5.2
3. Manifest: dell-bto-xenial-xenial-master-X11-iso-20160613-0

https://certification.canonical.com/submissions/status/21901

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

submission_2016-05-26T03_44_26.594239.xml contains indeed a very weird char in one of the comments field:



making the xml invalid

(Note I can see it using my text editor, geany).

I'm pretty sure we have a iolog_to_text method in plaibox that we don't use for comments before calling an exporter.

Changed in checkbox-ng:
status: New → Triaged
milestone: none → 0.28
Revision history for this message
Pierre Equoy (pieq) wrote :

These submission files cannot be parsed by plainbox:

----------------------------------------
cat submission_2016-05-26T03_44_26.594239.xml | plainbox dev parse submission
ERROR plainbox.parsers: Cannot parse input
Traceback (most recent call last):
  File "/home/pierre/dev/checkbox/plainbox/plainbox/impl/parsers.py", line 137, in parse_text_to_ast
    return self.parser_fn(text)
  File "/home/pierre/dev/checkbox/checkbox-support/checkbox_support/parsers/submission.py", line 1326, in parse_submission_text
    parser.run(TestRun, messages=messages)
  File "/home/pierre/dev/checkbox/checkbox-support/checkbox_support/parsers/submission.py", line 1307, in run
    tree = etree.parse(self.file, parser=parser)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1184, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 602, in parse
    parser.feed(data)
  File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 26310, column 15
----------------------------------------

The root cause seems to be some characters that are input in the <comment> section, such as

    ^[[6~ (this appears when pressing "Page Down" key while entering a comment in checkboc-cli)
    ^[[B ("Arrow Down" key)
    ^[ ("Escape" key)

The current workaround is to remove these invalid characters manually from the submission files using Gedit for instance.

The proper fix will be to sanitize the comments that we can enter in checkbox-cli.

Changed in checkbox-ng:
status: Triaged → Confirmed
assignee: nobody → Pierre Equoy (pierre-equoy)
Revision history for this message
Pierre Equoy (pieq) wrote :

A fix has been provided for Checkbox.

However, the submission files previously created by Checkbox have to be manually cleaned up to remove these strange characters (basically, "^[" should be replaced by "" (nothing)).

Then you can check if the edited submission file can be parsed by Checkbox:

    cat edited_submission.xml | plainbox dev parse submission

If Checkbox doesn't crash, then the submission is OK and can be sent over to C3!

Changed in checkbox-ng:
status: Confirmed → In Progress
Changed in checkbox-ng:
status: In Progress → Fix Committed
Pierre Equoy (pieq)
Changed in checkbox-ng:
milestone: 0.28 → 0.27
Pierre Equoy (pieq)
Changed in checkbox-ng:
status: Fix Committed → Fix Released
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.