Display the line or column number of the error when the manifest.webapp file is not a valid file

RESOLVED FIXED in Firefox 29

Status

()

Firefox
Developer Tools: WebIDE
P1
normal
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: gkw, Assigned: isk)

Tracking

Trunk
Firefox 29
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
"permissions": {
    "desktop-notification": {
        "description" : "To show notifications"
    },
    "geolocation": {
        "description" : "Marking out user location"
    },
    "systemXHR": {
        "description" : "To get systemXHR",
                                         ^^^ comma should not be here
    }
},

===

This sample portion of the manifest.webapp file will cause app manager to fail with the following error:


The webapp manifest isn't a valid JSON file: SyntaxError: JSON.parse: expected double-quoted property name at: file:///Users/skywalker/trees/boilerplateAppFxOS/manifest.webapp


(the cause is known: an accidental additional comma at the end of the description for systemXHR)

However, there is no easy way of deducing the error, because the line/column number of the error is not shown. If one has a large JSON file, one will have to look through the entire file to find the location of the error manually.

In this example, one participant of an app contest (involving Firefox OS apps) had to debug this line by line / character by character to get to the root of the error cause.
Component: Developer Tools: Debugger → Developer Tools: App Manager

Updated

4 years ago
Priority: -- → P1
Blocks: 912912
Bug 507998 is showing some signs of life, so we may soon get this info from JSON.parse.
Depends on: 507998
Now that bug 507998 has been fixed, we're now getting this info in the App Manager for free.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

4 years ago
Setting FIXED since the fix is known (bug 507998).
Resolution: WORKSFORME → FIXED
Assignee: nobody → iseki.m.aa
Target Milestone: --- → Firefox 29
You need to log in before you can comment on or make changes to this bug.