We experienced the same issue after upgrading to 8.4.
We narrowed it down to the hisorange/browser-detect composer package. Are you using that? Try disabling it / commenting it out.
hisorange/browser-detect