how to identify broken binding using UI5 diagnostics - sapui5

Step 30: Debugging Tools of the UI5 documentation introduces the diagnostics, which can be accessed through the ctrl-alt-shift-S keycombo.
After deliberately inserting an error in a path, I've tried navigating to the binding info in the control tree as instructed:
I'm supposed to be able to see that the binding path of the number attribute is marked as invalid
It cannot possibly rely on me spotting the typo because that would imply already knowing what the error is in the first place.
Can anybody explain how exactly I should do that?
Additionally:
Chrome 84.0 or Firefox 79.0, same results.
tried the online version from the official demo kit as well as my own localhost copy

The fix is now in the master branch of UI5. If you run the downloaded sample with
https://openui5nightly.hana.ondemand.com/resources/sap-ui-core.js, we can see the invalid binding path indication:
ExTendedPrice (invalid)

Related

Blazor WASM PWA Could not find any element matching selector 'app'

I am using Visual Studio 2019 v16.8.5 and have a single Blazor WASM PWA project in my solution that I recently upgraded to .NET5. In between I got it to run, but lately I cannot get to start it anymore.
The screen says Loading... and that's it.
The console output (Firefox) shows the following error: Microsoft.JSInterop.JSException: Could not find any element matching selector 'app'.
At some point this was running without this issue, but even reverting the solution to an earlier state does not bring any change and I still get a blank screen.
I found a github source saying "just remove builder.RootComponents.Add<App>("app"); from Program Main". If I do this, the error disappears and I just get a blank page saying Loading... with no errors in Console output.
Additional information: I now do a full cache cleanup (cookies and website files) after running the project in Visual Studio to prevent any caching issues.
What am I doing wrong that I can't see any of my pages?
Even after explicitely calling them like https://192.168.188.31:5555/login?
Depending on the template version used to create the initial app, a slightly different HTML is used inside the index.html.
Older version could look like
<app>Loading...</app>
while newer should like
<div id="app">Loading...</div>
In case, the first is still true, the corresponding declaration should be
builder.RootComponents.Add<App>("app");
For the second the line should be
builder.RootComponents.Add<App>("#app");
The second uses the id selector #.
Usually, the index.html is seen as a "static" file and is cached by the browser. So changes, you have done in that file are not reflected immediately. The easiest way to disable the cache is to open the developer tools, go to the Network tab and disable the cache.

Array Visualizer Expression Evaluation error: Unsupported debug session type

While working with Visual Studio Community and a trial version of ILNumerics Array visualizer, I cannot get the visualizer to evaluate any expression.
I tried on multiple projects, including fresh new ones from basic templates. Every time, I get an "Unsupported debug session type!":
Is there a specific debug setting required to make it work? I could not find any information anywhere on the web.
The solution was to change debugger type in the startup project. It used to be on "Mixed", but I had to change it to either "Native Only" for native C++ parts of my solution or "Managed Only" for managed parts of my solution.
I still don't understand why it would not work on fresh templates, but my guess is that it was still set to an automated value with which the Array Visualizer didn't know what to do.

Guidance for diagnosing {"message":"An error has occurred."}

Can someone point me in the direction of instructions for working out what has gone wrong with my Mobile Service App. It was working fine with a couple of simple tables. I then extended the data model using code first and migrations and now all I get when enter a url such as:
http://xxxxxxxx.azurewebsites.net/tables/firm?ZUMO-API-VERSION=2.0.0
is
{"message":"An error has occurred."}
I have now removed all new tables/data objects and controllers so that only one exists for a single table called "Firm" which has a single string property. I have switch OFF authentication/authorization in the Azure portal but I still get the same error.
I have tried both CustomErrors=Off and CustomErrors=RemoteOnly in the debug web config. I am publishing a debug build.
I have tried switching on logging and remote debugging etc in Azure but am unable to work out what is broken. I have tried remote debugging with a break point in my FirmController GetAllFirms method but error occurs before that point.
How do I get more useful information about what the problem is?
I have managed to solve this one myself. In fact now that I know what it is the answer was staring at me from the build output.
The issue was that when extending my model I referenced a .NET Standard 2.0 class library containing some enum definitions that are common to both the backend and the client.
I did not notice the warning that some assembly versions needed binding redirects added to web config. Double click on the warning message and VS2017 will add the necessary entries to web.config for you.
For more details see here on github.
I never did manage to get behind the {"message":"An error has occurred."} though. I solved this by rebuilding my backend project one step at a time and it was after adding the reference to the .NET standard project than I noticed the "Consider app.config remapping of assembly ..." messages in the build output window.

Accidentally published CompositeC1 with precompile on

I accidentally published Composite C1 from Visual Studio with "Precompile during publishing" when I first set it up and have now come to realize that several plugins do not work with precompile turned on. Unfortunately I have no idea how to reverse this. I've tried several things to no avail. I usually end up with a 500.0 error. If I go to the admin interface everything is working properly, and I can even preview the pages, but from the customer side all I get is a 500.0 error.
Of course I could republish from the Visual Studio project I have, but that project has the default template on it. I've tried copying what appears to be changed on the server to the original project but I end up with a 500 error. I've tried removing all the precompiled stuff on the server but I end up with a 500 error. I'm pretty lost.
At this point I'm willing to do anything. Is there a doc explaining how to copy the content to a newly downloaded copy, kind of like an upgrade doc but "side-grading"? I am using the most current version at the time of writing this 4.2 Update 1
Thank you
Solved use the PackageCreator suggested by wysocki's answer. It was not exactly straight forward to create the package. The errors can very cryptic at times. So here are some of the issues I encountered and how I got past them:
wysocki was correct to suggesting starting with a bare bones installation even though my original project was started with the Venus theme. I tried both ways.
I encountered issues with the MasterLayout and the Page Template Features which are currently not supported by the PackageCreator, although they may be supported in future versions. The solution was to add the missing elements to the fresh C1 project from the original C1 installation in the App_Data/PageTemplates and App_Data/PageTemplateFeatures folders.
A few times I ran into an issue where I added the same page or function twice to the PackageCreator. This was obviously my fault, but it should be mentioned that you can add the same site element twice which throws and error on import. Make sure you are careful to only getting one of each when creating the package to be exported.
If you are getting and error and it uses and Id like "4061397b-ee9e-4512-984d-f2b2d41eb654" I've found that it was very helpful to extract the zip file you are trying to import and then search the extracted folders for that Id. The lines with the Id usually have more information on them that will help you to identify exactly what content page or whatever the error is being generated from.
If you are using installed packages in your project like SimpleSearch for example, make sure you don't add it's functions to the PackageCreator. Install them separately.
I had an issue where I somehow had an element in the Data section that didn't have a "type". The error simply "The type cannot be empty". This was obviously tough to find so I suppose the lesson is, less is more. If you think your project might have a few elements that are unnecessary, don't add them at first and see if the project you import them into complains about missing them. It's much easier to troubleshoot missing elements than it is to figure out which element is causing the issue that you really didn't need.
Is there a doc explaining how to copy the content to a newly downloaded copy
You can try and export content / templates / anything else related to a "package" via Composite.Tools.PackageCreator.
Its latest version gives you quite a lot of flexibility in what you can export ("package") - please its user manual.
Once the package is made and downloaded, you can go on and install it on a new website. If you export / import a lot of content / templates etc, it makes sense to have a "Bare Bones" site as the new one.
All the starter sites like "Neptune", "Venus" are installed as a bunch of packages in specific order during Composite C1's initial setup.

Exclude ReSharper error for "Resource not found" inside Views

I have an MVC2 application and use ReSharper 6.1 - I've heavily customised the Code Inspection Severity and edited what it decides to show as errors, warnings, suggestions and hints, but I cannot seem to stop it from telling me that a specific resource is missing when utilising a HTMLHelper.
So, for instance:
<img src="<%:Url.Content("~/Resources/Image12345.jpg")%>" />
I get an error on every line similar to the above telling me that the path above does not exist - which at design time it does not, but during the build process all of these views are XCOPY'd to a location which contains all of the resources, such as the images, so at the point of running the application all of this path resolution is correct. Because of working in a team of people, some of which are new to ReSharper, I wanted to exclude this error from appearing as it may cause colleagues of mine to start fiddling with something that isn't broken.
ReSharper obviously doesn't know that this isn't an issue and it has no way of knowing which is why I want to turn off this specific bit of analysis. I've found on the whole that ReSharper is massively customizable and in version 6.1 under Inspection Severity there are some new MVC options, which have proved useful - but I can see no way of turning off the inspection for this.
Anybody have any ideas?
There are few options, press ALT+ENTER.
Suppress inspection "Path Error" with comment. You can suppress whole block of code, not only each of tag.
Suppress inspection "Path Error" at all at whole project.
There is new feature of 6.1 - path mapping, but it seems broken in conjunction with MVC.
Set to ignore that specific error by:
Open Soultion Errors Window by ReSharper->Windows->Soultion Errors Window.
Right-click annoying error and select Ignore Error.
See answer for another error for more explanation.
Well - It seems that this particular type of inspection is not currently catered for. I'll see if I can request it with JetBrains and hopefully more granular MVC inspection will be included in the future.
Cheers guys