Node Red Debug node not working in Bluemix - node.js

I would like to know if anyone has suggestions for how to fix my broken debug node. So far I've done the following:
1) I have set up an inject node with a repeating message that sends the string: "Repeated Message," every 1 second. I've also connected this node to a debug node. When I deploy with this configuration (making sure that the debug deactivation sidebar is not selected), I see nothing on the debug output.
2) I've also set up one twitter input linked to my account that searches for basic keywords in actively sent tweets. I've also connected both a debug and a Twitter node which publishes the tweets with my desired key word. It's strange because, the debug node does not send any info to the debug tab after being deployed. However, my twitter account is constantly publishing each tweet that contains my chosen keyword.
I'd appreciate any help pointing to why the debug node is not working.

To confirm, you have the debug node such that the sidetab is green as shown in pic below?
If it is white, it will not show the data in your debug window.

I had same situation. In my case I has been set USERID and PASSWORD authentication in IoTF environment variables. Today I took off these authentication information of user ID and password from my environment variables. Then Debug Node is working well.
I hope this can help you.
Best Regards

If you are behind a proxy, add your application address in the exceptions of your web browser. It worked for me, I had the same issue as you did while using Firefox

Related

ASP.NET Core 5 MVC web app returning bad request errors in some pages after deployment to IIS

I have tried everything. I configured Windows Server 2019 according to Microsoft documentation and I successfully deployed a .NET 5 web application to the IIS.
I can get to the login page. I can even get to the forgot password page and they show themselves fine. However when I try to do any action (send the forgot password link or login to the page) I get a "Bad Request" from the server. I haven't found a way to explain why.
I have tried several, and I mean several things found Googling around but nothing helps. This include disabling https within the .NET Core application, trying to get a detailed error page using the app.UseDeveloperExceptionPage(); instruction inside Startup, etc etc but nothing works. I always receive this page trying to execute any action:
If someone could help or point me into the right direction, I will really, REALLY appreciate it.
Thank you
PD: In case it has anything to do with the problem, the error, at least the two that I can reproduce (because I can't even log in), happens, I think (maybe don't) when redirecting to another page in Microsoft Identity.
EDIT: code was asked by one of you. Thank you.
As you see, there's nothing specific in the forgot password screen for my application. This is scaffold code from Microsoft Identity. I even edited it and just let one line of code inside it, which is the default return code anyway as follow:
public async Task<IActionResult> OnPostAsync()
{
return RedirectToPage("./ForgotPasswordConfirmation");
}
As you can see, there's nothing special with that code. Here's the html that calls it, again, is a scaffold of Microsoft Identity with little to no changes (by little, I mean, maybe some CSS and a new value of view data):
But then again, forgot password page actually shows and seems well in the front end, but immediately I try to enter my email and click enter in this page, (also, just a scaffold of Microsoft Identity):
Nothing happens. I receive the bad request. There's NO magic nor custom code here. Something silly is going on.
EDIT II: YES, locally it works perfectly. The strange behavior happens only when deployed to IIS.
EDIT III: I coded and enabled logging in my .NET Core APP and wrote that to a file, and I think I finally got, at least the error (not the reason yet):
But why?? Cookies are enabled in the server browser without avail, same issue. Someone has a better idea than disabling anti forgery rules to login and forgot password pages?
Thank you
For some reason, when I deployed the first version of my app into IIS, I thought it was a good idea to just browse it from the IIS link. Of course, in a new mounted Windows Server 2019, IE is still the default browser. I connected directly to the IP of my web app via VPN, but used Chrome this time. Guess what? All problems disappeared. Yes, it's a bad idea to try to use a modern framework like .NET Core Identity with IE.

Randomly getting a login prompt

I am randomly getting a login prompt asking me to log in to localhost:3000 while working on my project (in localhost). Sometimes it does not show up the whole day and next morning I get 10 prompts in a row (canceling through pressing escape), and then it starts working properly again.
These are the errors I get in the console when it has been canceled:
I suspect one of the following, but really I have no idea:
Webpack is not configured correctly
There is some resource that requires authentication (but I can't figure out which), I am running everything on localhost
There is something wrong with the node.js server thingy...
Any tips on what might be going on are very welcome.
Edit: My backend is mocked in localhost.
Edit 2: I found this: Receiving login prompt using integrated windows authentication and it is possible that the thing that is causing the error is some faulty configuration in my IIS. But it is difficult to verify since it only shows up randomly.
Webpack has nothing to do with your API calls.
401 errors are due to auth credentials failing.
It means that your backend ask you to update your token(s) used for auth in API calls.

How to simulate BT and WiFi connection during UI automation test with fastlane?

I am beginner of iOS testing and I really need help. Thank you in advance.
I've tried to implement a simple test with fastlane to create screenshots and evaluate if all needed elements exist (fastlane snapshot, I follow most common tutorials and up to now everything works fine). App which is tested needs a WiFi and Bluetooth connection to open some tabs. I have no idea how to manage it. When app is redirected to view where connection is checked and test wait (methods such as sleep(30) or waitForExists(app.otherElements["snapshotReady"], waitSeconds: 60) but nothing happens and app cannot be loaded to the next view (generally, when app works on device context is switched to the next view).
I could not find any programatically method anywhere to manage it.
The best way to do this to look for the FASTLANE_SNAPSHOT key in the UserDefaults that is inserted automatically by snapshot.
if UserDefaults.standard.bool(forKey: "FASTLANE_SNAPSHOT") {
// runtime check that we are in snapshot mode
}
You can use logic like this to simulate any user interfaces that you may need.
More info can be found at - https://docs.fastlane.tools/actions/snapshot/#launch-arguments

See full msg debug with Node-RED

I'm running an application on Bluemix using Node-RED. I added a debug node to output the complete msg object, but it is being truncated in the debug console. How can I see the complete object?
You can have the output sent to the console as well as the debug tab by checking a box in the debug node's config. The whole object will be sent to the console
The current debug tab will always truncate, but there are some plans to possibly add a separate debug window that could show the whole message. Also have a look in settings.js as I believe the character limit for when to truncate is set there, so if it's just too short you can increase it a bit.
EDIT:
I'd missed the bluemix tag earlier. To view the console log you need to use the cf command to tail the output. e.g. for a app called node-red you would run the following:
cf logs node-red
Not sure if you can access your settings.js file but if you do, look for the debugMaxLength property and set it to a larger number. It will display more of your debug info.
This also applies for the Node-RED add-on for Home Assistant. After changing the debugMaxLength value in config/node-red/settings.js, one needs to restart the add-on.

how to trace or log from a CFC file

Is there a way through the brasiers like firebug or another browser plugin to do traces or log console from a cfc file.
I'm completely new to CF so sorry if this seems like a stupid question.
If you want logs to be visible in the browser ColdFire is your best choice. With it, you can see all of ColdFusion's extended debugging information even on a production site. Unless you have the proper authentication via ColdFire the server won't spit out the extended info.
As #gillesc recommended, you can use LogBox which is extracted from the ColdBox framework. The ColdBox Framework has a debugging mode that allows you to trace messages to the bottom of the page, or, to a separate window. This is useful even on production sites since you can observe the tracer methods from other users.
Finally, you can simply print to the console using writeDump(var="my log message",output="console") for quick debugging--or--use the <cflog> tag to save log messages to a named log file which you can monitor using tail. For a dead simple solution, you can save the log file to the root of your site and simply press F5 to see the new log entries; however, I do not recommend this practice (unless you are saving credit card information and share that file with me :).
Hope this reply helps.
Aaron
There is a cftrace tag that will allow you to log output to the console, among other spots in your application and development environment.
<cftrace category="init data" type="Information" var="myvartooutput" />
Calling this tag will output the relevant content in a few places:
The console in ColdFusion Builder, if you are using that IDE
In Dreamweaver, the Adobe docs mention a server debug tab/view (I don't use DW, so am not sure)
At the end of the request in the debug output
In cftrace.log, which is in your log directory (/COLDFUSION/INSTALL/DIR/logs/cftrace.log)
You can also use the tag cflog to write data to one of the standard log files or you may choose to have it write the desired data to a custom log file.
<cflog file="customlog" application="no" text="Output #somevar#!" />
If "customlog" does not exist, CF will create it for you (in the same location noted above).
Hope that helps!
EDIT: I offered this more of an alternative way to using to Firebug ... if you want the logs/traces but were not necessarily wed to a browser/plug-in.
If you've got CF Builder you can actually set up a debugger, but it's terribly slow. Here's the documentation on that: http://help.adobe.com/en_US/ColdFusionBuilder/Using/WS0ef8c004658c1089-31c11ef1121cdfd6aa0-7fff.html
There's also ColdFire, which is a Firebug add-on. Never used it before but I hear good things: https://github.com/nmische/ColdFire/
Try ColdFire for firebug extension
http://coldfire.riaforge.org/

Resources