Closed Bug 964901 Opened 6 years ago Closed 4 years ago

Curate debug output for HomePanel add-on developers

Categories

(Firefox for Android :: Awesomescreen, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mcomella, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [lang=js])

For example, the execution of most HomeProvider statements will be wrapped in a `Task.spawn(...)` block. However, developers, particular those unfamiliar with promises, may not know how to retrieve that error output i.e.:

...).then(function success() {}, function error (e) {
  e.errors.forEach(function (error) {
    log(error.message);
  });
});

We should log these errors for them and then rethrow so that they can dynamically react to any possibly intended errors.

Other debug statements, beyond just the SQL, should also be curated: we want to be sure to log all errors (or at least code defensively so that developers are forced to catch them).
mcomella, would you want to make this into a mentor bug?
Flags: needinfo?(michael.l.comella)
Whiteboard: [mentor=mcomella][lang=js]
Flags: needinfo?(michael.l.comella)
Hi Michael and Margaret, I would like to try to fix this bug, but I am completely new to this (beside fixing 2 very trivial bugs). If you could guide me where I should get started (may be from some documentations), I would like to work on this.

Regards

Zack
Assignee: nobody → zliu.ur
Status: NEW → ASSIGNED
Flags: needinfo?(michael.l.comella)
Hi Zack! For this bug, you should make yourself familiar with the way HomeProvider and home panels work for add-on developers. Here's some documentation you can read:
https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/Firefox_Hub_Walkthrough
https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/HomeProvider.jsm

A good place to start would be to make your own test add-on that you can use for debugging. A good place to start could be the add-on I use for debugging:
https://github.com/leibovic/hub-kitchen-sink/

With that add-on, you can try making mistakes that developers might make, then see what is reported in the error console. Anything that's confusing is a good place for improvement.

This bug is pretty open-ended, so the main task will be investigating what we should do.

mcomella might also have some ideas.
Flags: needinfo?(michael.l.comella)
Mentor: michael.l.comella
Whiteboard: [mentor=mcomella][lang=js] → [lang=js]
Hey, Zack. Are you still working on this?
Flags: needinfo?(zliu.ur)
Unassigning due to inactivity. Zack, let me know if you want to return to this issue.
Assignee: zliu.ur → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(zliu.ur)
Mentor: margaret.leibovic
I don't know of many home panel add-on developers – I don't think we need to do this unless it gets more popular.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.