0
votes

I'm scratching my head here...

I wrote an sdk addon that uses OS.File to write a text file.

It works fine using jpm run

However, when I install it into Firefox as an xpi

Then even my console log messages don't show up in the console.

But it still runs, I can debug it (it has a timer loop and so I see it pause on the timer when I set a breakpoint in there)

The code seems to run fine except for:

  • the console log messages not being displayed
  • the file not being written

What I mean by code running "fine" is the variables all seem to get filled correctly in the debugger and the execution seems to occur correctly (breakpoints work)

My extension doesn't make any visual modifications to the page. So I don't know if that part would work correctly or not, but I'm just concerned right now about the failure to log and to write files.

anyone have any idea what could be the problem?

1
Please edit your question to be on-topic: Questions seeking debugging help ("why isn't this code working?") must include: •the desired behavior, •a specific problem or error and •the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable Example, What topics can I ask about here?, and How do I ask a good question?.Makyen♦

1 Answers

1
votes

Then even my console log messages don't show up in the console.

jpm run sets different log levels compared to a regular firefox profile. relevant docs

the file not being written

depending on where you do your calls to OS.File e10s may make a difference due to content sandboxing. Try toggling that. If it does make a difference then you're using file IO in a context where you shouldn't.