Developing on the mobile version of Discourse

After doing some digging through the source, I found two environment variables that help:

  • PRINT_EXCEPTIONS - shows all exceptions, maybe too noisy to be valuable but it helped
  • RAILS_LOGS_STDOUT - logs everything to console which is what I was looking for above

These helped confirm that there wasn’t an error occurring within Rails nor my theme’s SCSS.

Apparently there was some gzip component stuck between ember and Rails. I’m not sure how this got there, but when the headers Content-Encoding exists, this particular line was copying that over and causing the browser (and curl) to just ignore the entire response body (presumably because it was no longer encoded in gzip).

It looks like this has been fixed in 2.9.0.beta1 but I am running 2.7.13.

Removing the gzip component in development fixed the issue for my particular version, but it looks like it’ll work fine with gzip in the future. Not sure why the desktop version didn’t exhibit the same issue.

Hopefully this helps anyone else facing similar issues.

3 Likes