eligrey / eligrey/FileSaver.js

Detect NetFront browsers

Open
#591 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

Nintendo Switch, PS4 and other video game consoles / other electronics use the NetFront family of browsers (https://www.access-company.com/products/browser/)

For whatever reason, the Nintendo Switch reports an error (2809-1209) and completely crashes (black screen) when hitting a page using `saveAs`. The reason appears to be this line: https://github.com/eligrey/FileSaver.js/blob/master/src/FileSaver.js#L145 -- directing to a data URI of unexpected media type `attachment/file` consistently triggers a blackscreen. It is likely a bug affecting other devices using NetFront NX.

NetFront NX Browser appears to be WebKit based and is testing as if it is Safari but not Chrome. It's probably easiest to test the user agent. The current (HOS 8.1.0) user agent from Wifi captive applet is

```
Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/601.6 (KHTML, like Gecko) NF/4.0.0.12.6 NintendoBrowser/5.1.0.19294
```

PS4 similarly puts the string "PlayStation 4" within parentheses after the 5.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.