安卓模拟器运行APP遇Next.js客户端异常,求绕过模拟器检测方案
安卓模拟器运行APP时遇Next.js客户端异常的排查与模拟器检测绕过方案
问题现象
在安卓模拟器中运行某APP时,欢迎界面弹出错误:Application error: a client-side exception has occured (see the browser console for more information)
控制台输出关联信息:A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
对应的错误处理代码如下:
function Z(e) { let {App: t, err: u} = e; return console.error(u), console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"), i.loadPage("/_error").then(n=>{ let {page: o, styleSheets: a} = n; return (null == s ? void 0 : s.Component) === o ? Promise.resolve().then(()=>m._(r(1053))).then(n=>Promise.resolve().then(()=>m._(r(26506))).then(r=>(t = r.default, e.App = t, n))).then(e=>({ ErrorComponent: e.default, styleSheets: [] })) : { ErrorComponent: o, styleSheets: a } } ).then(r=>{ var i; let {ErrorComponent: l, styleSheets: s} = r , c = Q(t) , f = { Component: l, AppTree: c, router: n, ctx: { err: u, pathname: o.page, query: o.query, asPath: a, AppTree: c } }; return Promise.resolve((null == (i = e.props) ? void 0 : i.err) ? e.props : (0, R.loadGetInitialProps)(t, f)).then(t=>es({ ...e, err: u, Component: l, styleSheets: s, props: t })) } ) }
真实设备上运行该APP无此错误,因此推测是APP的模拟器检测机制触发了异常。
已尝试的操作及问题
尝试修改APK文件,但在签名环节出现错误:<apk-filename>-aligned-debugSigned.apk is missing
求助需求
请提供绕过该APP模拟器检测的可行方案,或排查解决此异常的具体方法。
内容的提问来源于stack exchange,提问作者user20928849
相关产品推荐
相关产品推荐

