Application problem after build - ElectronJS - node.js

I've build my electronJS application with electron-packager and after the build finished, when I launched it, every data was gone. And I got an error that I've never got before on the dev app. (C.F screenshot)
paths are right because it's working on my dev app with the same configuration.
How can I fix this quickly please.
I've tried to change the directory to full path, change inside of the config.js file.
C.F : https://imgur.com/gallery/VN17hNf
Get all my data and my application work correctly. (get all data, add data, display data)

I've finally found the problem. When you build your app, you need to use relative paths. Like path.join(xxx). The app doesn't understand the ./your_path.
And next problem that I've solved, if you use json file and write data inside of it, you need to have a unpacked app w/ .asar file.

Related

Looking for example of raw json configuration file per builtType in Android Studio/Gradle

I have an Android App and need a JSON configuration file for AAD B2C in the raw directory which is called by like this:
PublicClientApplication.createMultipleAccountPublicClientApplication(activity.getApplicationContext(),
R.raw.auth_config_multiple_account,...)
I need a R.raw.auth_config_multiple_account for each buildType (and possibly flavor). Let's just assume I need a dev, test, prod. I read this article on providing alternate resources and this one for Configure build types, but I don't know exactly how this is supposed to work.
I assumed it might be a subdirectory in raw which is named for the buildType, but that does not seem to be the case. Does anybody have a simple example of this?
Also which buildType is used when you press play on Android Studio and run the app in the emulator?
I figured it out in case anybody else has questions around this. This article and this documentation helped.
I went into the project view in Project explorer, created a debug directory (to match my debug buildType in the build.gradle) in the src directory (making it a peer of main, test and androidTest), created a res directory under the new debug directory and a raw directory under the new res directory. I copied the auth_config_multiple_account.json file into it and altered the configuration to test it. All worked ok.

Error while publishing Xamarin.iOS IPA in Application Loader

When I am trying to deliver my app through Application Loader I get multiple errors saying:
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file myapp.app/SwiftFrameworkSimulator/libsswiftCoreLocation.dylib" is not permitted.
I see these files are packaged into my app, how do I stop them from getting packaged into my .ipa? What are these files, and how to solve this issue?
I fixed the issue by manually deleting the SwiftFrameworkSimulator folder and it´s content from the archive, but I don´t know why such thing would be added in the first place.

Why Would React Change Image File Extension On Build

I am using create react app and have an image tag that was inadvertently capitalized (tony.JPG). I did a build and successfully pushed the app to production on Heroku. However, I realized the capitalization issue and change the extension to its proper lower case (tony.jpg). However, the build file still showed with the capitalized extension. I deleted the build file and did a new build but got the same issue again. I resolved the issue by changing the img tag src but I have a lingering question. Why would react keep capitalizing the image extension even though the image file was changed to lower case and there was a new build?
I am using Node, Express, & Create React App. I've tried changed the file path in explorer directly and in my client > public > images > tony.JPG. It may be related but the build > images folder not only has the capitalized extension but has two other files (one that is tony.JPG~e5463541ef50286886de13e03dea670ef69c85c6 and another file called tony.JPG~HEAD).
Images name in public folder (tony.jpg):
Image in build folder (tony.JPG):
As #Matt-holland mentioned the type of OS matters, OSX is type insensitive if you're using it
If you run git mv tony.JPG tony.jpg it will rename it in git
So the issue was resolved when I did a hard reset on my PC. I am using Windows 10. I believe the issue is a bug as the issue resolved itself (i.e. the file name changed) after I ended up doing a hard reset on the PC. It could be an issue with my machine and/or VS. Hopefully this will help someone else that comes across the same issue.

How do I edit files with Web IDE in Bluemix DevOps?

My ultimate goal is to simply edit the package.json file to add the momentjs library so I can access it my node red app running in bluemix, but my question is even more fundamental.
My setup:
I have a bluemix nodejs app running a simple node red app I created. I want to use the moment.js library to do some date math and understand I need to update the dependencies file in the package.json file.
Question:
When I go to my Bluemix console runtime screen for node.js I can see the package.json file and can click on it to see the contents, but can't edit. I have tried creating projects/Git and can't see this file. I can use CLI using CF and get to the file and view it but again I just don't know how to edit it.
I would really like to understand how I can see these files and edit/source code control them using the Web IDE and just can't figure it out. I do fundamentally understand source code control just don't understand how to set this all so I can specifically see this file.
Main goal is simply to update the package.json file in the app directory.
In your Bluemix Dashboard,click on your APP and in the APP Overview you will see ADD GIT BUTTON(top right corner).
Click on it and once you've added your project to GIT, you will get a GIT URL.
Go to that URL and click on EDIT CODE( you can update your package.json) and then commit the changes.

Mime type error with Meteor and Recorder.js Web Worker in Production Mode

I'm using Recorder.js with Meteor for client-side audio recording, and it works wonderfully in development. However, when I run in production, the web worker associated with Recorder throws a syntax error: unexpected token '<'.
I think it has something to do with concatenation of Javascript files in production mode, because the file has already been minified (works in development after minifying). A look at the development console shows,
Resource interpreted as Script but transferred with MIME type text/html: "http://myapp:3000/client/compatibility/recorderWorker.min.js".
I experienced the same errors/issue while trying to implement Recorder.js in Meteor. After fiddling around with it a bit, I have Recorder.js working well in Meteor by performing the following steps:
Move the recorderWorker.js file to your apps /public folder.
Put your recorder.js file anywhere within your apps /client folder.
Open up your recorder.js file and edit the WORKER_PATH variable to
var WORKER_PATH = '/recorderWorker.js';
Use the Sources tab in chrome debugger (or your tool of choice) to see the uglified js file, saved it to disk, and poked around in there. There is probably a de-uglifier available somewhere.
Try loading the ugly file in an editor and poking around. At least that's something...
That file is probably present in the .meteor resources, but I've given up before I found it. The create a bundle for production tool should make that more obvious...

Resources