Get file name and line number for warnings and errors on vizzy flash tracer - actionscript-3

What's the simplest way to see where warnings and errors come from, on vizzy?
Here's a few instances I see on my mac. Quite different from the screenshots we can see on its wiki:
Warning: 'flash' has no property 'prototype'
Warning: 'StageVideo' has no property 'prototype'
Warning: 'AsBroadcaster' has no property 'addListener'
Warning: 'AsBroadcaster' has no property 'removeListener'
Warning: 'flash' has no property 'prototype'
Warning: 'flash' has no property 'prototype'
Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
Thanks to the last answer, I can now see VizzyTrace.swc is required for many vizzy functionality. But even after considering all that (and enabling debug flag on the FLA, replacing trace for trc, setting up the "extra options" and adding the SWC) I still see nothing.
Now every trc line is prepended with an almost useless (I can control traces just all right and easily induce where they came from) file name and line number under Flash Professional's own output when I "Test Movie" but not even then will Vizzy show those lines. Not to say after the SWF is compiled and I'm tracing on the browser.

The warnings and errors you see are internal flash player things, so don't bother about them. you are not able to explore them. What concerns last error (cevure attribute), explore that in Vizzy, check policy log in the bottom right corner.
What concerns VizzyTrace.swc, you should enable that in Vizzy by Extra - Options - Trace Parser - Connect VizzyTrace library. Once done, you would be able to right click (for code snippet) and double click (for opening file) on every line that you trace.

Related

PhpStorm. Highlight file in project tree on inspection error (e.g. Strict type checking rules violation)

Is it possible to highlight a file in the project tree on inspection error (e.g. Strict type checking rules violation) in PhpStorm?
I would like to highlight it as a serious error. Couldn't find anything in settings and documentation.
Now it just highlighted the wrong property and mark the line on the right.
v
I thought it would be possible by changing the Inspection Severity to the highest Error level (see the official doc page on how to configure Inspection Severity)... but apparently this will not work.
It seems that right now only certain hardcoded error types (that come from lower level Lexer/Parser as I understand) can display the "red underwave" in the Project View panel.
Watch the following ticket: PhpStorm's WI-33552 --> platform-wide IDEA-96288 (star/vote/comment) to get notified with any progress.
It's not the same of course, but will give yo an overview on a most-important errors (for your filtering level/inspection profile).
As a possible alternative: Run Inspect Code manually (Code | Inspect Code from the Main Menu; you can invoke it for a specific folder/custom scope to limit the number of files to be processed) and then filter you results in the Problems toolwindow to only see the errors with required severity.
https://www.jetbrains.com/help/phpstorm/running-inspections.html#run-inspections-manually
https://www.jetbrains.com/help/phpstorm/problems-tool-window.html#854a2648

Forge-Viewer is missing iPart Factory Members and colors are wrong

Please be patient, I'm new to Forge, C-language, and web-apps, so I'm going to misuse terms and nomenclature like crazy. I'm working on converting a configurator from Configurator 360 to Forge. I created the original Inventor Assembly and iLogic and we farmed out the Forge side of the project. We use our ERP system to generate the engineering number we want from Forge. That number is passed to Forge through a URL and reversed engineered to select all the right options in Inventor. Then .step, .pdf, and .svf files are created with the viewer presenting the .svf and two buttons to download the .step or .pdf respectively. The .step and .pdf look just like they used to from C360 but my viewable is just wrong.
capture from Forge-viewer wrong capture from Inventor-step right
The color of the object should be black and it's white and all parts that are created using iFactories are missing. I don't know if this is two separate issues or caused by the way we are zipping the files for conversion.
I know I haven't given much to go on as to code that could be wrong because I'm not really sure where to start. I do see this in the Immediate Window
Loading model: dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cHJpbmNlX291dHB1dF9idWNrZXRfMTVlNDY2ZDYyNDU5NGQ3YmIyMjg0OWM3MDMxODgzOTAxL1BDNDAyMDAyMEEwMC0yOTBYVFhMLAAAAA
Exception thrown: 'Microsoft.JSInterop.JSException' in System.Private.CoreLib.dll
And then it throws that same exception 9 more times... that appears to be one less time then the number of parts that are missing from the viewer.
Any help is much appreciated even if it's just asking questions that might point me in the right direction.
Edit 1:
Found a new error that might help. It shows up if I refresh the browser.
ERROR: Cannot read properties of undefined (reading 'getRoot')
TypeError: Cannot read properties of undefined (reading 'getRoot')
at Object.loadDocumentNode (https://localhost:44365/_content/ForgeFunctions/forgeViewerJsInterop.js:168:40)
at https://localhost:44365/_framework/blazor.server.js:1:70369
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:44365/_framework/blazor.server.js:1:70335)
at https://localhost:44365/_framework/blazor.server.js:1:26442
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:44365/_framework/blazor.server.js:1:26412)
at e.processIncomingData (https://localhost:44365/_framework/blazor.server.js:1:24223)
at e.connection.onreceive (https://localhost:44365/_framework/blazor.server.js:1:17308)
at WebSocket.i.onmessage (https://localhost:44365/_framework/blazor.server.js:1:46784)
Edit 2:
I noticed when all the files were being copied to make the zip to create the svf, that a subdirectory was created for the iPart Members (named after the iFactory.) I use a flat zip file (all files in one big folder) so I tried creating a zip with a file structure to match our Vault structure. I then got errors that parts couldn't be found. Lots of other things were tried and then I found this blog post. I used the first option to add the "/p" in my Activity Command Line and set "autodesk.inventor.interop -> Embed Interop Types = false". My iFactory Members are now in the viewable!
Anyone have ideas on what's wrong with the colors? I believe "black" is the only color that is wrong. I do think it's a modified appearance from the appearance library but again the .step file looks good (aka is the color I set) so what in the viewer controls colors?
Edit 3:
So... I fixed the colors... I opened the file in Inventor. Opened the Appearance Browser and Unchecked "Self Illumination" for the "Black" color. Saved, Tested, Worked. Went back in turned "Self Illumination" back on, Saved, Tested, Still Works! So didn't really change anything just changed it and changed back and boom.

How to enable web security in Chrome after disabling it?

I did the __disable-web-security in Terminal on Mac. Do I need to enable it again? Or does it enable by itself after restart?
If I need to enable it again, how do I do that? I searched everywhere, but didn't find.
Go to chrome://version and look at the Command Line. If the command line argument is still there, you should restart chrome and then launch it normally (without the flag).
A bit more context: "Flag" refers to two slightly different concepts in Chrome:
Any command line argument that starts with a -- (as opposed to an argument that names a URL or a file, for example).
The list of toggles available at chrome://flags.
Any arguments added manually to the command line will only persist until you quit Chrome. On the other hand, the toggles set at chrome://flags will persist until they are reset. (To further blur this, invoking chrome://restart will preserve the command line flags.)
This particular flag makes its presence fairly obvious, with a banner:
You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer.
So it should hopefully be clear whether the flag is present (and also why this is the sort of flag that can't be persisted at chrome://flags).
The flags set in #2 are delimited in Chrome's command line by the --flags-switches-begin…--flags-switches-end section. Arguments outside of that section are coming from somewhere other than chrome://flags (namely, from the command line, except in the case of Chrome OS and Android, which have their own startup procedures).

Fixing deprecated files

I'm trying to eliminate the console warnings (of deprecation) from the iron-flex-layout element.
When I load my app, I get the following errors in the console:
iron-shadow-flex-layout.html:12 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-shadow-flex-layout.html:12
iron-flex-layout.html:14 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-flex-layout.html:14
iron-fit-behavior.html:221 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
When I inspect the file paths, I see the following:
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-flex-layout.html
http://localhost:8080/bower_components/iron-fit-behavior/iron-fit-behavior.html
I am reluctant to go tinkering around and manually deleting files in my bower_components directory.
So, how can I fix these errors? What is the recommended best practice?
Edit
Here is the deprecated file on Github. Line 14 writes the console warning. But this deprecated file is not being imported anywhere in the app. (I know because I did a global search on the string iron-flex-layout/classes and, separately, on iron-shadow-flex-layout.html). Instead, I have done as the warning suggests; I imported iron-flex-layout/iron-flex-layout-classes.html everywhere instead. But the warning persists nevertheless.
I assume the element owners and Google overlords want to retain the console warnings in place (and not accept a PR which removes it). So, what is the best practice? Live with the warnings? (It doesn't seem quite right to edit my local copy and just comment out the warnings.) Or should I do something else? (Maybe there is another option I'm not aware of.)
Edit2
per #tony19:
I recommend setting a breakpoint in the deprecated file (on the console.log() line) to see who's importing it. – tony19
So now, I'm using this:
https://github.com/PolymerElements/iron-flex-layout/blob/master/classes/iron-flex-layout.html
<script>
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
debugger;
</script>
I'm seeing some information appear when the app reaches the breakpoint. But nothing so far indicates what's causing the import of the iron-flex-layout element. Or what to do to fix it.
Is there a command or something that can log what file imported another file? I've looked all over for how I might accomplish that. Could anyone please describe in detail what that might look like?
The warning indicates that an HTML file in your source or dependencies is importing ../iron-flex-layout/classes/iron-flex-layout.html, which is deprecated. The import must be in your tree somewhere, or else the warning wouldn't appear. I recommend setting a breakpoint on the console.log() line of the deprecated file to track down the offender.
If you're in control of the offending element that imports this deprecated file, you can update the import to use iron-flex-layout-classes.html that the warning recommends. Otherwise, you can petition the maintainer of the offending element to update their dependencies (or submit a PR ;).
I had this same issue today and thought the same thing. However, diving a bit deeper I found a few third party components were using paper-styles/paper-styles which called in iron-flex-layout/classes/iron-flex-layout.html. The reference it'd be there somewhere I'm certain. Hope that helps.

Is it possible to get a stack trace for chrome console warning?

React warned me about bad state logic somewhere:
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.
When I click the line number, it points to a console.warn line in the React source code. How can i see where in my code the warning is coming from? Is there a way to get a stack trace from warn?
It's hard to track down when there's > 20 distinct components.
when you are inspecting the react source code in chrome, you can click on a line number to add a break point.
Once you refresh the page, the debugger will halt at the given line and via the call stack on the right you then can see how you got there.
Google chrome show stack traces for warnings:
But chromium does not: