找不到元素。 [英] Element not found.

查看:100
本文介绍了找不到元素。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我刚刚提交了我的应用程序的新版本,电池电量级别。我现在看到一个错误"未找到元素"。

I have just submitted a new version of my app, Battery Level. I am now seeing an error "Element not found".

我添加了HockeyApp,这是发送此错误的崩溃报告的地方。它运行良好,除了它显示内存位置而不是代码中的行号。在追踪错误方面没有多大帮助。 

I've added HockeyApp and that is where the crash report for this error is being sent. It's working well except that it shows memory locations and not line numbers in code. Not very helpful in tracking down the error. 

我怀疑过早收到调度员可能导致异常/崩溃报告。错误报告下方的代码段。 

I suspect getting the dispatcher too early is what may be causing the exception/crash report. Code snippet below the error report. 

Incident Identifier: a1fed573-xxx
CrashReporter Key:   xxxx
Hardware Model:      Blade Pro
Identifier:      BatteryLevel
Version:         1.1.51.0

Date/Time:       2017-05-21T16:02:09.188Z
OS Version:      Windows 10.0.15063.296
Report Version:  104

Exception Type:  System.Exception
Crashed Thread:  26

Application Specific Information:
Element not found.

Element not found.

Exception Stack:
SharedLibrary!<BaseAddress>+0x4a29f0
BatteryLevel!<BaseAddress>+0xeb053e
BatteryLevel!<BaseAddress>+0xeb0417
BatteryLevel.MainViewModel.GetCurrentViewDispatcher()
BatteryLevel!<BaseAddress>+0x150d8d0
SharedLibrary!<BaseAddress>+0x4a29f0
BatteryLevel!<BaseAddress>+0xeaffc8
BatteryLevel!<BaseAddress>+0xeaff04
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

  &NBSP; &NBSP; &NBSP; private CoreDispatcher GetCurrentViewDispatcher()

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; var currentView = CoreApplication.GetCurrentView()?? CoreApplication.MainView;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; var dispatcher = currentView?.Dispatcher ?? CoreApplication.MainView.CoreWindow.Dispatcher;



  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;退货调度员;

  &NBSP; &NBSP; &NBSP; }

        private CoreDispatcher GetCurrentViewDispatcher()
        {
            var currentView = CoreApplication.GetCurrentView() ?? CoreApplication.MainView;
            var dispatcher = currentView?.Dispatcher ?? CoreApplication.MainView.CoreWindow.Dispatcher;

            return dispatcher;
        }

我甚至尝试了两种不同的方法来获取调度程序,如果一个为空,请尝试下一个。 

I've even tried two different methods for getting the dispatcher in case one is null, try the next. 

然后检查许可证

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; var dispatcher = GetCurrentViewDispatcher();

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; await dispatcher.RunAsync(CoreDispatcherPriority.Normal,CheckLicense);

            var dispatcher = GetCurrentViewDispatcher();
            await dispatcher.RunAsync(CoreDispatcherPriority.Normal, CheckLicense);

也许我需要对它进行空检查。 

Perhaps I need a null check on that. 

提前致谢,

Stephen

推荐答案

嗨Stephen,

Hi Stephen,

你在哪里看到这个错误"元素没有发现" ;?从开发人员中心崩溃报告或您调试应用程序时?根据我们的理解,您似乎没有将您的pdb文件上传到曲棍球应用程序,这使得您的崩溃报告尚未分析。如果您上传了
的pdb文件,那么您的报告将会被分析,您将能够看到与崩溃相关的更多信息。

Where did you see this error "element not found"? From Dev Center crash report or when you debug your app? Per our understanding you seems haven't upload your pdb file to hockey app, which makes your crash report haven't been analyzed. If you upload your pdb file then your report will be analyzed and you will be able to see more info related to your crash.

祝你好运,

Barry


这篇关于找不到元素。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆