javascript error when trying to open notarized .pkg - javascript

Running Mac OS 12.3.1.
I have an .app I wrote using Python and Pyinstaller and I wish to create a .pkg from it.
First, I code-signed the app:
codesign -f -o runtime -v --deep --timestamp --entitlements
/Users/fishbacp/Desktop/entitlements.plist -s "Developer ID Application: My Name
(XXXXXX7RBW)" /Users/fishbacp/Desktop/my_app.app
I then used
-spctl -a -vv '/Users/fishbacp/Desktop/my_app.app'
which was accepted. To test things at this stage, I had the .app notarized and opened it on both my machine and a different one. Everything worked fine.
From there I build a signed product:
productbuild –timestamp --sign 'Developer ID Installer: My Name (XXXXXX7RBW)' --
component /Users/fishbacp/Desktop/my_app.app /Applications
/Users/fishbacp/Desktop/my_package.pkg
Check the package is signed:
pkgutil --check-signature /Users/fishbacp/Desktop/my_package.pkg
which worked.
Then I submitted my_package.pkg for notarization. It was successfully notarized, and the log file yielded no warnings.
However, when I double click on the my_package.pkg a pop-up window states the package could not be read due to a javascript error.
I looked into my computer's installer log, which stated
Failed to load specified background image
It also stated
IFJS: *** exception: SyntaxError: Unexpected identifier 'Connectivity'. Expected an
opening '(' before a function's parameter list.
For reference, the actual name of my .app is EEG Connectivity Explorer.app.
Observations:
The IFJS exception: SyntaxError seems very strange and vague to me. In light of the fact the .app was notarized and opened, I can't see where it's coming from.
Using a very simple test .app, I found the installer works.
Could the background image message in the installer log suggest I need to create a separate Distribution.xml by any chance? (I have no experience with creating one and would have to look into that should that be the case.)
I'm really at a loss for what to try next.

Related

psql crash: No such file or directory on m1 Mac

I was coding and suddenly my mac froze, I couldn't really do much and I force shutdown my mac and after restarting my code won't run saying it can't connect to the database. I checked if psql had any issue and this error message pops up.
"psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory. Is the server running locally and accepting connections on that socket?"
I tried everything to fix even trying to reinstall psql and nothing works. I found a tutorial online saying to check the /usr/local/var/postgres and deleting ostmaster.pid. But I can't find that file anywhere. My /usr/local is also a bit different, I don't have these files var/postgres. I'm freaking out rn :'(
Try checking the environment variables on your pc and check to see if psql is in the path. this make fix the issue
Nvm just fixed it, the file is under homebrew. I deleted it and now everything works again!

Node.js Setup Wizard ended Prematurely on Windows 10 64 bit

I tried to install Node.js Setup for the first time (node-v8.9.1-x64 and node-v9.2.0-x64) on a system running Windows 10 64-bit , but it is giving the dreaded error
Node.js Setup Wizard ended Prematurely
Failed Attempts
Launching .msi from Command Prompt ran as Administrator
Disabling the installation options
Performance Counters
Event Tracing
Online Document Shortcuts
Registry Key Search
No registry keys were found when running the following
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{793c9b44-3d6b-4f57-b5d7-4ff80adcf9a2}" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{1e2e15d7-3760-470e-8699-b9db5248edd5}" /s
The installation log shows an error status: 1603. [View Installation Log]
Node is not installed
node -v
Output:
'node' is not recognized as an internal or external command, operable program or batch file.
Attempt 3
Tried the following based on Github issue #4329, but theres no output after running this.
msiexec /i node-v8.9.1-x64.msi /qn+ ADDLOCAL=ALL REMOVE=NodePerfCtrSupport,NodeEtwSupport
Any ideas how to solve this problem?

How can I open my node.js program in chrome? - VS Code

I'm new to node.js, and VS Code. I'm watching this tutorial, and the issue is that in the video, he runs his server. I can do this fine, but, when he opens his browser and types http://localhost:8888, he can connect to the server like he is a client. When I do this, the program Emit(I think that is what its called) opens and has an error - Error: ENOENT: no such file or directory, open 'h:\Microsoft VS Code\bin\index.html' at Error (native). In the beginning of the tutorial, he went to edit configurations and entered the local host url into some text box and changed other settings. Although, he is using IntelliJ, and I'm using VS Code. How can I make it so I can enter the url and run as a client.
[EDIT]: When I try to start without debugging, I get the options select enviornment - Chrome or Node.js. Also, I went to the terminal and typed node app(file name is App.js), and I get the error in the terminal - module.js: 471. throw err. Error: cannot find module at C:Users\Name\App
Thank you.

Javascript not loading due to net::ERR_CONTENT_LENGTH_MISMATCH

I've got an app that runs fine locally, but barfs in production. (Classic problem, right?)
In production, the JS isn't firing correctly. When I open up the browser console, I see this error:
net::ERR_CONTENT_LENGTH_MISMATCH
When I look in the network tab of Developer Tools, is shows that it failed on a GET request for text/html.
It's a cryptic error. I've only found two other SO posts that even mention is and they're unsolved. (For the interested: first post and second post)
Any idea (1) what it means or (2) how to resolve it?
I am getting Error: net::ERR_CONTENT_LENGTH_MISMATCH
Have a look at your server logs to determine what the real issue is.
For me the problem lay somewhere between nginx and file permissions:
tail -f /usr/local/var/log/nginx/error.log or run nginx -t to determine your conf location, where you could specify a custom log path.
refresh the asset in your browser, eg http://localhost:3000/assets/jquery/jquery.js
You may see something like this in the logs:
"/usr/local/var/run/nginx/proxy_temp/9/04/0000000049" failed (13:
Permission denied) while reading upstream for file xyz
Heres how I fixed:
sudo nginx -s stop
sudo rm -rf /usr/local/var/run/nginx/*
sudo nginx
According to this bug report, that error occurs when an external resource length does not match the Content-Length header given in the response.
This might occur because of a misconfigured server, or (as a stretch) maybe some BOM characters got put into the file, or maybe even different lines endings (are you writing on a DOS machine and deploying to a UNIX machine?) may cause issues.
Hope this helps.
I had a similar issue when trying to interpret JSON results. It turned out that somewhere along the line an odd character landed in the database - in this instance the culprit was "â??". It is not clear how this value arrived in the database, but it is likely related to HTML encoding issues - "Â" character showing up instead of " " Either way, after removing the odd characters, the problem was solved.
I had similar issue
[crit] 6889#0: *14817 open() "/var/cache/nginx/proxy_temp/3/02/0000000023" failed (13: Permission denied) while reading upstream
it was because Nginx worker process were not able to access folder /var/cache/nginx/proxy_temp/ - I just changed the folder permissions and everything started working
I had similar issue developing locally on MAMP and using Chrome as browser. Same problematic websites on the live servers had no such issues. First I thought it was MAMP that was playing around and I checked settings like PHP versions mismatch, apache version etc., reinstalled, but the issue remained. At the end I just switched to using Brave browser (was delaying the shift to Brave for a while anyway) and that fixed it for me.
Hope this helps.

Image and js is not geting displayed from apache tomcat

I have facing strange problem. I have deployed images and js file in Apache Tomcat directrory but it is not showing on page and a warning is coming up:
Resource interpreted as Image but transferred with MIME type text/html: "http://localhost:8084/webApp/img/access.jpg".
Earlier it was working fine but now jquery is also not working and the following error is coming up:
Uncaught ReferenceError: jQuery is not defined
Earlier this error message was appearing in Firefox but Chrome was working fine. But now it is showing the error in Chrome as well.
I have also tried to use the absolute path but no success.
<script src="/webApp/jquery-1.7.2.min.js"></script>
<img src="http://localhost:8084/webApp/img/access.jpg"/>
If you are using tomcat, you should locate the resources at $CATALINA_HOME/webapps/ROOT folder. From there, you might have access to the files.
You can check the access permissions from terminal. If you use unix / linux, locate to the folder:
cd $CATALINA_HOME/webapps/ROOT
And execute the command:
ls -la
This means it can be accessed by everyone, so should be available to everyone accessing to the server by browser
drwxr-x**r-x#** 22 user staff 704 11 jun 01:25 .
You could also try changing the permisions, but your server would be unsure:
sudo chmod a+rx webApp/img/access.jpg
Or go to the webApp folder via cd and execute
sudo chmod -R a+rx .
Deppending on your preferences (the last one means giving permission to all resources on webApp folder, what means givving access to all your projects in server, quite unsure...).
Hope it helps somebody.

Categories

Resources