如何分析SAP UI5应用的undefined is not a function错误-阿里云开发者社区

开发者社区> -开发者助手-> 正文

如何分析SAP UI5应用的undefined is not a function错误

简介: 如何分析SAP UI5应用的undefined is not a function错误
+关注继续查看

Recently I meet with an annoying Javascript error “undefined is not a function” during my Fiori development. After debugging the framework code for several hours

image.png, I finally find a more efficient way to find the exact source code which causes the trouble. I would like to share this small tip with you and hope it could help.


Issue: When I am doing test on my application on a local tomcat, I could only see an empty screen.


For sure there must be some Javascript error occurred.

image.pngimage.pngimage.pngimage.pngConclusion

Although this error is raised in UI framework js file, it is however an absolute application issue: the url of OData is defined in Configuration.js file by application as metadata, and UI framework in the runtime will ask for it by calling some callback functions defined by application and then consume it. Framework will assume always a String for OData service url returned by application.

After the following fix is done on application, the issue is fixed.

image.pngAny other alternative solution?

Later on I find another approach to find the position ( line 154, column 36 ) even without debugging.


I test my app with Firefox. To my surprise, it could directly display more detail about this error compared with Chrome: “j.serviceUrl.indexOf is not a function”.

image.pngimage.png



版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
备忘:maven 错误信息: Plugin execution not covered by lifecycle configuration
4.0.0  mymaven  mymaven  0.0.1-SNAPSHOT         org.hibernate    hibernate    3.5.4-Final    pom          org.
736 0
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
10072 0
android搭建环境错误 daemon not running. starting it now on port 5037 ADB server didn't ACK
android搭建环境错误  daemon not running. starting it now on port 5037 ADB server didn't ACK ADB server didnt ACKdaemon not running.
1514 0
如何处理WebIDE里运行UI5应用遇到的404 not found错误
how to resolve 404 not found error for sap-ui-core.js after project is cloned to WebIDE After you have cloned one project from github to webide as below:
13 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
10882 0
解决:Could not write JSON: No serializer found for class *** and no properties错误
解决:Could not write JSON: No serializer found for class *** and no properties错误
11 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
13882 0
成功解决解决VM软件安装Linux的Ubuntu过程,开启Linux出现Oprating System not found错误
成功解决解决VM软件安装Linux的Ubuntu过程,开启Linux出现Oprating System not found错误
19 0
2450
文章
0
问答
来源圈子
更多
+ 订阅
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载