This error is similar to many that others have been citing, with a different spin. I get the error, "Invalid signature. Code object is not signed at all. The binary at path [.../iscroll.js] contains an invalid signature. Make sure you have signed your application with a distribution certificate..." and so on, similar to these problems:
Error itms-90035 - Xcode
XCode Error itms-90035 - Invalid signature?
However, I haven't seen any so far that reference problems with javascript errors, so I wanted to post this question which I'll answer below with my fix.
The fix I found that worked right away was to remove the assets folder that is created by Cordova. If your build is properly created, only 5 files are needed:
index.html file
codova.js
assets/all.min.css
assets/all.min.js
assets/app.js
With just this small subset of files, the .js code signing errors disappear, along with any other errors you might be getting from .sh files, etc.
NOTE: We use minified code, and this list is for minified compiles.
Related
I've create a base assembly BaseDll that compiles as a referenced project by my main Blazor Server Side MainBSSApp.
The base assembly contains a few JS functions that are located in the myJSFile.js file of the BaseDll assembly (I've added them into a BaseDll.wwwroot folder).
So I add the reference to my JS file in MainBSSApp/Shared/_Host.cshtml (I actually tried several places, result is always the same - I now have it in the <head> section):
<script src="_content/BaseDll/myJSFile.js"></script>
When I execute the MainBSSApp on my standard VS version (Windows) all seems to work fine. Now I'm trying to migrate the project on Ubuntu with VS Code. Views referenced by BaseDll as well as services are working fine.
However, as soon as I call any JS method defined in the myJSFile.js, I do get an error because the function is not defined - and righ before that, I get the warning that `The scritp from "[...]/_content/BaseDll/myJSFile.js" was loaded even though its MIME type ("text/html") is not a valid JavaScript MIME type."
So I tried this fix but without luck (I tried both 777 and 705 permission, nothing changed)...
What am I doing wrong here?
Solution is indeed to add the ./ before the _content
<script src="./_content/BaseDll/myJSFile.js"></script>
credits to #pcalkins and to the docs...
I am able to load close to 100 GLTF files without issue with my code. But one file in particular causes this error:
"RangeError: Invalid typed array length: 4"
Would you know where it comes from and how to fix it ?
This error most likely means the file is invalid; you can test that by opening the file on http://github.khronos.org/glTF-Validator/. If so, I would recommend reporting a bug on the tool used to create the file.
Babylonjs sandbox is also quite useful.
https://sandbox.babylonjs.com/
Here you can upload your models to see if there are errors or stuff.
For example, the link above from Khronos won't tell you when the URLs on your file are not correctly formatted, as is the case when you rename the .bin file.
I need your help/guidance about one problem I have for the last two days.
The sonar-javascript plugin is not able to get the results of my Javascript UnitTests. I am generating unit tests and lcov results using JSTestDriver. The lcov results are working and are correctly shown in SonarQube. I also have to say that I am using Windows. Here is the error I have:
Test result will not be saved for test class "UnitTests.controlesTest", because SonarQube associated resource has not been found using file name: UnitTests\controlesTest.js"
The error is very similar to this one: Importing javascript XML JUnit tests to sonar using jstestdriver fails. However, this error seems to be fixed in the last SNAPSHOT (2.8). The file I am trying to access is stored in UnitTests/controlesTest.js. I tried to go into the sonar-javascript source, and find a way to correct this issue (at least, try to understand it). I ended up in the file JsTestDriverSensor.java in the function getTestFileRelativePathToBaseDir. I found that this line is not able to get my file (UnitTests\controles.js). Actually, fileIterator does not contain any InputFile.
Iterator<InputFile> fileIterator = fileSystem.inputFiles(predicate).iterator();
So I tried different predicates to understand why my file is not found. At the end, I found that the following predicate fileSystem.predicates().hasType(InputFile.Type.TEST) is the reason why this file is not found. A quick fix is to change:
- 108 testFilePredicate,
+ 108 mainFilePredicate,
I must be doing something wrong, maybe someone has an idea ?
The "sonar.tests" property has to be set in the sonar-project.properties (or in newer version SonarQube.Analysis.xml). This allows the sonar-javascript plugin to find the javascript test files.
I've tried to set up Simogeo's FileManager but I can only get half of it working.
My plan is to set it to a specific folder (../imgs/gallery) and allow the client to upload, download, rename, remove files - basically change the ones displayed on a specific page (../gallery.html).
Right now though, I can't get the FileManager to work properly. In it's absolutely simplest form (that is, uploading the extracted files to my /www/ root and duplicating filemanager.config.js.default to filemanager.config.js) it will allow me to create a folder and upload files but the second I do that, it'll just keep 'loading' something. Nothing shows, nothing is usable and a refresh will completely remove it from view.
The files are being created/uploaded in the ../userfiles/ folder which I can change in the future but it's just not working even in a pure setting.
(also, the instructions request changing a file ../connectors/php/filemanager.config.php, which for the life of me, I cannot find. ../connectors/php/default.config.php exists but doesn't follow the instructions very well if I was to substitute that.)
EDIT: I tried the 0.8 version, having no problems. It's a shame the up-to-date one doesn't work for me.
Are you sure permissions are set correctly on your folder ?
You could try :
chmod -R 0777 /path/to/filemanager/userfiles/
or (asserting you're running apache with www-data user :
chown -R www-data:www-data /path/to/filemanager/
You may also have a look to the configuration wiki page and sample page.
(also, the instructions request changing a file ../connectors/php/filemanager.config.php, which for the life of me, I cannot find. ../connectors/php/default.config.php exists but doesn't follow the instructions very well if I was to substitute that.)
Thanks for pointing this out. It is updated.
In my case the problem arose when migrating a site from dedicated hosting with PHP 5.3 to shared hosting with PHP 5.4, all of a sudden the file manager started behaving as described by the original poster. I updated to the latest FileManger version (2.0.0-dev) but still the same.
A look at the server error log showed a fatal error in connectors/php/filemanager.class.php on line #1312 where require_once('./inc/vendor/wideimage/lib/WideImage.php') failed to open the file. Checking the path there is no "vendor" directory so I removed that from the path and the server error went away. But still the same loading graphic.
I then considered that PHP 5.4.x wants to have the TimeZone set and depending on the server configuration may throw warnings or errors, even fatal ones in the background. So I added date_default_timezone_set ('America/Toronto'); at the top of the file connectors/php/filemanager.php and after that everything worked perfect. This may not be the optimal solution but it worked for me. If you try it of course change the TimeZone to your own.
This one had me pulling my hair out for a while, hope it helps someone.
I am new to SonarQube, and am trying to use it with a Javascript project, on Windows. I've followed the doc as best I can and am successfully seeing the static code analysis sonar does.
I am using JsTestDriver for my unit tests, and producing a code coverage report file. I see the test results in SonarQube, but the code coverage is always reported as 0.0%. If I don't specify a code coverage report file, or specify a file name that doesn't exist, the code coverage block in my dashboard does not display at all, so I know Sonar is seeing the file in some sense. I have run jGenHtml against the file and it produces correct HTML output, with the results I expect, so I know the file has content and is formatted correctly.
I have specified the location for these files in my Javascript plugin settings. As indicated by the doc and some forum posts I found, I used the relative directory path test/results for the actual unit test results (which show up fine) and the relative file name test/results/code-coverage.dat for the coverage report. I've also tried specifying the file as an absolute path, but it didn't help.
Any insight would be appreciated.
This is working now, thanks to the suggestion comment from David RACODON.
It seems my code coverage report contains file paths that look like this:
SF:H:\perforce_workspaces\atlasjs_main\.\test\lib\jquery-1.8.2.js
I edited the file to remove the \.\ bit in the middle, and now Sonar is able to import the file.
The sample project's coverage report does not have this in its paths, and I note that I have been using a slightly newer verson of jsTestDriver than the sample app. I am using 1.3.5, while the sample app comes with 1.3.4.b. I don't know if they changed the output format between revisions of the coverage plugin, or if this is something specific with my project. In any event, I should be able to figure out a way to prevent or remove the offending characters.
Note that jgenhtml was able to read my file just fine with the extraneoud \.\ so this seems to be an issue with Sonar being very picky.