Glimpse Null Reference Error PostImplementation - glimpse

When I enable glimpse and whenever I navigate to a page with any parameters in my MVC 3 site I get this error: -
[NullReferenceException: Object reference not set to an instance of an object.]
Glimpse.Mvc.AlternateType.GetBinder.PostImplementation(IAlternateMethodContext context, TimerResult timerResult) +146
Glimpse.Core.Extensibility.AlternateMethod.NewImplementation(IAlternateMethodContext context) +73
Glimpse.Core.Extensibility.AlternateTypeToCastleInterceptorAdapter.Intercept(IInvocation invocation) +165
Anyone know how I can fix this?
It seems any url with a parameter causes that error.
I have asynchronous pages: -
localhost:52603/Chart/Index
which doesn't error until it redirects to a page requiring a parameter like: -
localhost:52603/chart/displaymodel?modelid=5b881fc7-c789-4d24-a52f-b34a56c098e1 localhost:52603/MakeImage/DisplayMakeImage?makeId=456ab51c-a4bb-4e2a-a673-de38de4ec28d
I am using a few different technologies in the site: - EF4/ SignalR/ MEF/ Redis/ Tropo/ Log4net/ Elmah
Thanks

Same problem here, I think is a bug in Glimpse 1.0.
I've just reverted to 0.87 and it works well for me.

This has been confirmed as a bug in Glimpse 1.0.0.
You can track the issue report on GitHub to keep up to date on the progress of this bug.
Sorry for the inconvenience!
Edit: This bug is now fixed and is available in Glimpse 1.0.1

Related

Broadleaf - running locally - problem getting started the API project

I'm trying to run Heat Clinic 6.0.1 locally following getting started tutorial: https://www.broadleafcommerce.com/docs/core/current/getting-started/running-locally
I managed to run admin and site but not the API project. The application starts without problems but when I go to http://localhost:8082/api/v1/swagger-ui.html I get a 404. In the log I see this exception:
javax.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
Also trying to log in directly in the API with user broadleafapi and password gives 404.
My environment: Windows 10, jdk 8, maven 3.6
What's wrong? Can you help me? Thank you
Thanks for the report. I reproduced this and it looks like that with the update to Spring Boot 2.0, we did not appropriately override the updated property that specifies the servlet location to embedded Tomcat. Thus, when you went to /api/v1/swagger-ui.html, the application treats it exactly like that URL which is what gave the 404.
Setting the server.servlet.contextPath=/api/v1 property appropriately stripped off this path as part of the servlet context and resolved the 404.
I tested around a bit and was able to 'Authorize' the app (button at the top right of the Swagger page) with the credentials information that get spit out in the logs:
Basic auth configured with user broadleafapi and password: <<generated>>
then I was able to hit the API endpoints.
The changes you will need to make locally in your project to consume the fix are at https://github.com/BroadleafCommerce/DemoSite/commit/422d1cdc37f847afd8bec0be477ab784cbad2e9d#diff-991c59b6dbb0f619b8570d8f8779eaddR11. You will notice that I moved the original definition in default.properties over to common.properties and I recommend that you do the same. To be clear, follow these steps:
Delete the server.servlet.contextPath entry in `api/src/main/resources/runtime-properties/default.properties
Change server.servletPath in api/src/main/resources/runtime-properties/common.properties to server.servlet.contextPath
Thanks for trying out Broadleaf and the report, sorry for the rough early start!

Why is micronaut invoking the wrong controller method?

I have a micronaut API like this:
#Get("/")
List<Club> listClubs()
#Get("/{id}")
Club show(Long id)
In my unit test, when I invoke the show method, the listClubs() method is actually getting invoked, instead.
Why is this happening?
Details:
Thinking that my URL mappings must be wrong, I started debugging into Netty to try to understand how the framework constructs URLs.
In HttpClientIntroductionAdvice, the context shows the API method like this:
Club show(Long param0)
The interceptor is setting param0 in the parameter map, which doesn't match the actual parameter name of my method. When the URI template is expanded, this causes the ID to get dropped (thus the URI becomes / instead of /1).
I am trying to follow this example:
https://github.com/alvarosanchez/micronaut-workshop/tree/master/ex02/solution/clubs
There is one important different in my project, which is that the endpoint is set at "/club" instead of at "/":
#Controller("/club")
#Client("/club")
I am using a diff tool to compare my project to the sample, but I am struggling to find any other difference (besides package name changes).
Why is this happening? What should I be looking for?
Thanks
Update:
Tested the target endpoint with the browser - looks fine.
Gradle clean does not resolve the issue.
I switched from debugging the Application class with IntelliJ to using "gradlew run" and in the process, I made a change to build.gradle (adding JVM properties pass-through from the gradle CLI). I also played with enabling/disabling the annotation processor in the IDE.
(note: In the previous project, I enabled annotation processing as soon as I imported into the IDE. On this project, I didn't enable it until I started having issues.)
I think the build.gradle alteration caused the problem to go away. Since the issue shows up unreliably, it's hard to tell for certain if this is the change that caused it to be fixed.

Deployed Node.js application to bluemix, error : cannot find concept-insights-devoxx.mybluemix.net/css/style.css

The style.css lives in public/css folder and config/express.js has
app.use(express.static(__dirname + '/../public'));
Still I am getting the following error
Please help , Thanks, Sandhya
I don't think your missing css is the problem. It would just mess up your styling on the page.
The TypeError above that seems more to the point. An object property "offsetTop" was referred to, but the object doesn't actually exist (or something that was supposed to create it, didn't return anything).
I'd guess that might have been what caused the 502 error, or perhaps the other way around (i.e. a proper response could not be received from the api call, and for some reason that case was not considered by whoever wrote the logic that comes after that).
Do you have the relevant code that you could post perhaps?
Thanks for the answer! The problem was in manifest.yml, where I was binding to a different instance of Concept Insights service. Therefore, the credentials given in app.js for the instance of Concept Insights populated with my corpus were getting overwritten.
Thanks for looking at this issue !
Sandhya

browserLink error -- unsupported pseudo: index

When running my Razor-based Web project under VS 2013, using IIS, I am seeing the following error in browserLink:
Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: index
Turning off browserLink gets rid of the error. But what is the real fix?
For a similar question, see here:
Page uses an invalid or unsupported form of compression when debugging ASP.NET MVC app with Visual Studio 2013 Preview
It appears that this issue only appears when using browserLink and would not normally show up in production.
I found a discussion about it here. which says:
The issue is known bug in jQuery which is internally used in the Browser Link functionality. When selecting elements which contains ":" in its id, jQuery does not return element. The reason for the problem is that jQuery has some predefined pseudo-selectors and “:00” for example is not a valid selector.
The Browser Link script tries to find our detail tables elements by its id (the detail table id contains ":"), jQuery does not return element and the Browser Link scripts throws an error that the character sequence is not recognized.
As this issue is still not fixed in the latest version of jQuery the only workaround for now is to disable the Browser Link feature in VS 2013.
The options given for disabling browserLink given include the following options:
Set appSetting vs:EnableBrowserLink to false.
Set debug=false in web.config file.

Why does Sitecore throw a NullReferenceException exception when I redirect to one of its pages?

I'm running Sitecore 6.1 on Windows 2008, IIS7, and I'm trying to use the URL Rewrite Module to do a redirect. When I enable the rule and hit the URL that triggers it, I get a YSOD. The same rule works perfectly on a non-sitecore site on the same machine. According to the Failed Request Trace, the rewrite module does its thing just fine, but then Sitecore throws an exception, even if the redirect points to another server. This is probably a result of something I have misconfigured, but I just can't understand why it doesn't work. The details from the YSOD are below.
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.Nexus.Web.HttpModule.(Object sender, EventArgs e) +273
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Sitecore has it's own engine for URL redirection, so some wires are probably getting crossed here. Possibly you need to move your HttpModule so it's executing earlier in the chain.
Sitecore claim to have fixed this in release 6.2 rev.100831 (Update-4) - http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues%20Recommended/Rewriting%20URLs.aspx
Use the pipeline mode "Classic" rather than "Integrated"
http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues%20Recommended/Rewriting%20URLs.aspx
You can get the same error when doing
Response.Redirect("~/SomeUrl.aspx")
within C# code, the way to fix this is to use the overloaded:
Response.Redirect("~/SomeUrl.aspx", true)
which will end the response immediately.
The rewrite module is obviously not ending the request immediately allowing Sitecore to hit this problem. You could get around this problem by creating a module to deal with the redirects or trying to extend the URL Rewrite Module to end the response immediately.
I experienced this in MultiSite instance on Sitecore v6.5, see my answer here: Sitecore NullReferenceException on GetBrowserClassString

Resources