googlefonts / fontbakery-dashboard

A library-scale web dashboard for Font Bakery, no longer developed
Apache License 2.0
28 stars 10 forks source link

[Dispatcher] BrowsersDiffsAndPreviews: simplejson.errors.JSONDecodeError #150

Open graphicore opened 4 years ago

graphicore commented 4 years ago

In https://fontbakery.graphicore.de/dispatcher/process/fd607148-ae2f-44b3-a757-35f1c5bf2cfc

Traceback (most recent call last):
  File "worker-launcher.py", line 207, in consume
    run()
  File "/var/python/worker/diffbrowsers.py", line 159, in run
    , self._out_dir, bstack_credentials, gfr_url)
  File "/var/python/worker/diff_tools_shared.py", line 92, in func_wrapper
    func(logger, font_before, font_after, out_for_font, *args, **kwargs)
  File "/var/python/worker/diffbrowsers.py", line 109, in run_renderers
    run_browser_previews(font_after, browser_previews_out, auth, gfr_url)
  File "/var/python/worker/diffbrowsers.py", line 58, in run_browser_previews
    diff_browsers.new_session([font_path], [font_path])
  File "/usr/local/lib/python3.7/dist-packages/diffbrowsers/diffbrowsers.py", line 55, in new_session
    self.gf_regression.new_session(fonts_before, fonts_after)
  File "/usr/local/lib/python3.7/dist-packages/diffbrowsers/gfregression.py", line 55, in new_session
    self.info = request.json()
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Seems like an iregluar error caused by the worker or an error response of the external service (BrowserStack).

vv-monsalve commented 4 years ago

After re-running the process it threw a similar error result. I think it has to do with the complexity of the project: 4 weights, 2 styles (roman-italic) and a huge amount of glyphs, including Arabic script.

The first attempt produced only 2 font folders:

This second time it produced 4 fonts folder:

In https://fontbakery.graphicore.de/dispatcher/process/0238aabd-681e-4e8b-89e8-cf3a02ecf554

Traceback (most recent call last): File "worker-launcher.py", line 207, in consume run() File "/var/python/worker/diffbrowsers.py", line 159, in run , self._out_dir, bstack_credentials, gfr_url) File "/var/python/worker/diff_tools_shared.py", line 92, in func_wrapper func(logger, font_before, font_after, out_for_font, *args, **kwargs) File "/var/python/worker/diffbrowsers.py", line 109, in run_renderers run_browser_previews(font_after, browser_previews_out, auth, gfr_url) File "/var/python/worker/diffbrowsers.py", line 58, in run_browser_previews diff_browsers.new_session([font_path], [font_path]) File "/usr/local/lib/python3.7/dist-packages/diffbrowsers/diffbrowsers.py", line 55, in new_session self.gf_regression.new_session(fonts_before, fonts_after) File "/usr/local/lib/python3.7/dist-packages/diffbrowsers/gfregression.py", line 55, in new_session self.info = request.json() File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.7/dist-packages/simplejson/__init__.py", line 518, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.7/dist-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

m4rc1e commented 4 years ago

I'll look into this. Fault is probably in gf-regression.

graphicore commented 4 years ago

Thanks Marc! Could also be resource limitation in the worker maybe. Other than that we had a lot of successful executions of the worker, so if there's a bug it's subtle. :-)

graphicore commented 4 years ago

I just had a case where the workers were stuck on a diffbrowsers task. The last lines in the logs were:

2019-11-08 17:44:56,905:FB_WORKER:DEBUG:run_browser_previews with fonts: /tmp/tmpr2eed4q6/after/Kufam-SemiBold.ttf
2019-11-08 17:44:56,918:diffbrowsers.gfregression:INFO:Posting fonts to GF Regression

and

2019-11-08 02:29:10,776:FB_WORKER:DEBUG:run_browser_previews with fonts: /tmp/tmp7vr8828o/after/Kufam-Bold.ttf
2019-11-08 02:29:10,790:diffbrowsers.gfregression:INFO:Posting fonts to GF Regression

The full logs (way to long to post here in full, go to the very end):

fontbakery-worker-8655d8ff7b-LOGS.zip