Referencing UI5 controls from Unix based systems fails - node.js

I'm creating a NodeJS based application with sapui5 framework but I'm facing a problem.
My app and view work well in my Windows 10 environment. Now I'm trying to continue developing it in Ubuntu but I'm facing this problem in Checkbox.js:
The resource from http://localhost:8000/resources/sap/m/Checkbox.js was blocked due to MIME type ("type/html") mismatch (X-Content-Type-Options: nosniff).
Uncaught (in promise) Error: failed to load 'sap/m/Checkbox.js' from resources/sap/m/Checkbox.js: script load error
As you can see, the control does exist:
All other controls work normally. So when I remove the checkbox, my view works without problems.

See the section Console shows Uncaught Error: failed to load 'sap/m/xxxxx.js' from the doc.
And the reply by Tobias (tobiasso85) on the same issue:
Serving the resources depends on the server and its underlying filesystem used.
While Unix based systems are case-sensitive,
Windows is not case-sensitive by default.
I.e. in your view, you must have somewhere <Checkbox> which works on Windows but not on Ubuntu.
→ Change it to <CheckBox>.
Same applies to <ComboBox>, <LightBox>, <FlexBox>, ... etc.
Bonus: there are Breadcrumbs from the sap.m lib and BreadCrumbs from the sap.uxap lib. 👍
PS: when working in an IDE or editor that supports VSCode extensions, consider installing the official UI5 Language Assistant. That extension would've notified you that something is wrong:
The "Combobox" name is neither a class name in the "sap.m" namespace nor an aggregation of the <parentControl> class.

Related

Chrome Extension built on a Mac works fine, does not work when built on Windows or WSL2

Developer A created a Chrome extension in a Mac environment. Built, tested, published and working for all end consumers.
Developer B cloned the repo used to create the extension, built it in a Windows environment and the Chrome extension fails when posting data to an external API. The same is true when building the extension in a WSL2/Ubuntu environment.
Basic Troubleshooting
Verified developers are using identitical npm and node versions
Verified the zipped extension, built in a Mac environment, works when tested locally in a Windows environment
Odd Behavior of Extension Built in Windows
A popup created by the extension contains an error not present in the 'good' version.
popup.js:2 Uncaught SyntaxError: Invalid or unexpected token
And the offending line:
let payload = {}; // Object to hold data payload
Extension retrieves configuration data from a secure external API
Extension does not post data to a secure external API and does not report any API connectivity errors
Have any of you encountered this? If so, penny for your thoughts.
Update: VSC claimed the file was in UTF8 and, to be thorough, I re-saved the file as straight UTF8. The issue persists. (Thank you for the suggestion, wOxxOm)
We brought another developer into the mix and found the problem.
Turns out npm build isn't sufficient. Our process required npm run start in order to create a working deployable extension.
I will expand my answer if I invest the time into determining why this is.
Thanks again.

Uncaught (in promise): The message port closed before a response was received

So before the question I wanna point out that the only thing I could find on this issue was on this stackoverflow question. This issue suggest that this was an issue with wappalyzer, and it was fixed in version 4.0.1. however I am using wappalyzer version 5.1.4 and is up to date with this.
I am building a web-app based on the MEAN-stack, everything worked as intended for a long time, until this error kept poping up in my google-chrome console:
Everytime i would click in my app header, and use my front-end routing to load up different components / modules this error appears, however I dont see any issue with what the web-app presents to me (it's not like I am missing data)
More details on the error:
I have no idea whats going on, or where this issue comes from.
This was due to a failing plugin.
Disable all plugins, and enable them one at a time to find failing chrome extensions.
In this case it was the wappalyzer extension.

DotNetNuke module development errors after upgrading to VS 2012

I have been working on building a DNN module in VS 2010 under DNN 7.0.3. My module has a few controls, a web service, and some jQuery/Ajax calls to the web service. I am working in Windows 7 with IIS 7. Everything was fine until I upgraded to VS 2012. After that, I was getting 500 errors for all the files I am loading into my control, i.e. javascript files, css files, and even images (never saw a 500 error on an image before!). I tried rolling back my project to before I loaded it into VS 2012, but that didn't help. I found this article: Setting up separate ASP.NET app with DotNetNuke
and implemented the suggestion in answer 2 (adding location... to the web config file). That fixed most of the problems, but I am still getting 500 errors for 2 HttpHandlers I built (which just spit out some javascript) and for any calls to my web service. The error I am getting now is:
Parser Error. An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
It kind of looks like it can't find the codebehind for these files. That makes some sense, since that was basically the problem it was having with all the files before I added the tag to the web.config.
I tried a clean install of DNN 7.0.6 and just installed my module from the package that was created earlier, but still the same errors. Since I haven't made any change to my code since it was last working, I am pretty sure the problem has something to do with changes the VS 2012 install made to my machine but I have no idea what. Please help!!!
Thank you :-)
Check to see if you have a VIRTUAL DIRECTORY or Application on the DesktopModules folder, or on the Module's folder in there, sometimes that happens in VS.
Also make sure there is NOT a web.config file in the MODULE folder.

Runtime error: "Cannot find the library com.ibm.xsp.extlib.library" (browser)

I just created my first Xpage application, and I now wanted to port it to a simple mobile application, using the mobile controls in the Xpages Extension Library. Notes/Domino 8.5.3 Upgrade Pack 1 are installed on both client/Designer and server.
The Xpage application works fine in both client and browser.
I created a new Xpage, called "mobileMainPage", and simply add a Single Page Application control to it, save the file and attempt to open it through a browser (Safari first, then IE 9 just to test). In both cases I get the following error message:
Unexpected runtime error
The runtime has encountered an unexpected error.
Exception
Cannot find the library com.ibm.xsp.extlib.library, required by the application /Contacts.nsf.
I am opening the database on the server (entering the URL of the .xsp file in the browser). I am not using the preview browser feature of Domino Designer, but is calling the page like a user would.
How do I fix this? I even tried to install Upgrade Pack 1 once more. Still getting the same error message.
It really sounds like the library is not installed on the server.
type tell http osgi ss com.ibm.xsp.extlib on the server console and verify that the plugin is installed, that command should return a list of the extlib plugins and fragments and if they have been correctly resolved or not.
in your Domino console type:
tell http xsp diag com.ibm.xsp.extlib
also try:
tell http xsp diag com.ibm.xsp.extlib.mobile
This will tell you whether or not the plugin is resolved. If the plugin is not found it means the plugin is not installed the to correct location (domino/data/domino/workspace/applications/eclipse/plugins).. If a plugin that extlib depends on is not resolved it will show in the console.
Chapter 3 of the XPages Portable Command Guide goes into this in great detail :-)
Let me know the results of the above command
Make sure to tell your app that it should use the extension library. Open the Application Properties and go to the Advanced tab. Here, verify that the 'com.ibm.xsp.extlib.library' is checked.
I just encountered a similar issue when firing up a new server in a virtual machine (was testing out an issue with different server version). I included notes.ini setting OSGI_HTTP_DYNAMIC_BUNDLES and pointed it to a updatesite database I hastily replicated over from another server.
I am not certain for sure, but once I added my new server to the updatesite and restarted http, it took.

You must include the platform port before the LWUIT in the classpath runtime exception

I recently started using LWUIT. Great job and great program. I'm using Netbeans 6.9.1, S60 SDK and the webstart version of LCWUIT.
The first problem I faced was that I couldn't preverify Transitions3D.java file , however that was not an issue. I just removed that part of the code and recompiled the library from scratch. So I created a simple form with a "Hello World" Label and tried the "Create Netbeans Project" option of the resource editor. I did a Clean Build at the test_MIDP (where test is the name of my project) and tried to run it on the emulator. However I'm receiving this error message:
TRACE: <at java.lang.RuntimeException: You must include the platform port before the LWUIT in the classpath>, startApp threw an Exception
java.lang.RuntimeException: **You must include the platform port before the LWUIT in the classpath**
at com.sun.lwuit.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:67)
at com.sun.lwuit.Display.init(Display.java:400)
at userclasses.MainMIDlet.startApp(MainMIDlet.java:15)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=7
at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
java.lang.RuntimeException: You must include the platform port before the LWUIT in the classpath
at com.sun.lwuit.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:67)
at com.sun.lwuit.Display.init(Display.java:400)
at userclasses.MainMIDlet.startApp(MainMIDlet.java:15)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=7
at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
"You must include the platform port before the LWUIT in the classpath"
Any ideas on how to fix this error? I tried to run the MIDlet with both S60 and JavaME SDK 3.0 emulator and I received the same error.
StackOverflow warned me that there are similar questions however I couldn't find anything about related to my issue. If not please inform me.
I shall answer my own post:
The problem was that in the UI jar I was including. LWUIT comes with 2 "sets" of UI.jar. The generic one which is in LWUIT\UI folder and the platform specific ones which are in the LWUIT\Ports folder.The generic one is being used as "parent" project containing all the common code,however if you MUST import the .jar file which is for your platform. As readme file says:
While these projects will compile easily they will be useless for any purpose since they don't include the binding glue for the platform, to use the platform one needs to use the appropriate projects underneath the specific ports directory to a given platform.
While I was recompiling the library in order to remove Transitions3D.java file, I recompiled (and then imported ) the generic UI.jar. The correct thing to do is compile, the parent project (the generic UI.jar) THEN compile the port specific library (in my case the LWUIT\ports\MIDP\UI.jar) and then import it in your project and you are done.

Resources