Electron non-context-aware native module in renderer - javascript

I have updated electron to latest in my project because there were some printer issues with that now I am facing this problem which is when I am importing packages to frontend it's throwing this error yet this works without any problems yet this bothers me so much I have searched and found this #1839
yet I can't find anything or i can't understand what should I do now I have tried
app.allowRendererProcessReuse = true;
it removes (in the command line) the errors but it stops working completely and throwing big error in frontend can anyone help me with this
(node:11484) Electron: Loading non-context-aware native module in
renderer:
'\?\C:\Users\admin\Desktop\co-electronupdate\node_modules#serialport\bindings\build\Release\bindings.node'.
This is deprecated, see
https://github.com/electron/electron/issues/18397.
(node:11484) Electron: Loading non-context-aware native module in
renderer:
''\?\C:\Users\admin\Desktop\co-electronupdate\node_modules#serialport\bindings\build\Release\bindings.node'.
This is deprecated, see
https://github.com/electron/electron/issues/18397.
as you can see there is a big discussion going still I can't understand i have 2 quetions
Should I ignore the error
Is there any fix that I can do or should I continue with electron 7.xx

finally, I found my answer if anyone curious about this here's the link
app.allowRendererProcessReuse = false
add this line to main.js

Following is the solution for now, until it can't be changed anymore!
// Make the following changes in main.js
app.whenReady(() => {
app.allowRendererProcessReuse = false
})

Related

amazon-ivs-web-broadcast - TypeError: Cannot read properties of undefined (reading 'bind')

Working with amazon-ivs-web-broadcast and running into the issue mentioned above when trying to create the IVSBroadcastClient
import IVSBroadcastClient from "amazon-ivs-web-broadcast";
let client = IVSBroadcastClient.create({
streamConfig: IVSBroadcastClient.BASIC_LANDSCAPE,
ingestEndpoint: streamConfigData?.stream_url,
})
Error message
Any ideas what may be causing this?
Tried passing hard coded values as arguments, and still running into the same error, so not sure what else could be causing this.
EDIT: This issue works fine on my local instance, but when it gets deployed to development, only then I am seeing the error mentioned.
I'm assuming that you are using React for this application (since I have seen this issue myself with React). If so, for now, you'll have to produce your production build with the following command:
npm run build -- --profile
To workaround an issue with the way function names are minified.

NativeScript Version 8.2.1 : how to use old outdated plugins

I am new to NativeScript and Webpack and i have migrated my native script app from 6.5.1 to 8.2 version, and i am using nativescript-orientation-free plugin ,i am getting build errors as this plugin still refers to tns-core-modules which is no longer supported in Native Script 8 and i am getting below errors
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 17:12-48
Module not found: Error: Can't resolve 'tns-core-modules/ui/enums' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 18:12-48
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
we do not want to use this paid version pro-plugins-nativescript-orientation
can you please let me know how can i fix this issue? is there anything i can do in the webpack.config.js ? I am stuck here.
You have my sympathies. (A quote from the movie Alien.)
Migrating a NativeScript app from 6.5 to 8.x can be wildly frustrating due to all the breaking changes. Make sure you watch this video: Migrating Legacy NativeScript 6 Project to 8.
When Migrating my app I found I had to migrate several of the plugins I used. Patch-package is your friend! To answer your question, you'll need to revise the links you circled. Sometimes this is easy, sometimes this requires investigation.
These three should work:
import { Application as application } from '#nativescript/core';
const Enums = require("#nativescript/core/core-types").Enums;
import { Frame as frame } from '#nativescript/core';
I expect these two should work, 'tho I didn't use them in my project:
import { Page } from '#nativescript/core';
import { View as view } from '#nativescript/core';
Good luck!
i removed this plugin and able to set the orientation without any third party plugins using
UIDevice.currentDevice.setValueForKey(1, "orientation");

React native build error: Attempt to invoke virtual method'boolean com.facebook.react.uimanager.FabricViewStateManager.hasStateWrappper()

My previous builds work fine, but now I'm getting this error when I try to take a build. I don't know how to resolve this error.
If anyone faces the same issue please help me out.
Attempt to invoke virtual method'boolean com.facebook.react.uimanager.FabricViewStateManager.hasStateWrappper()' on a null object reference
I was able to narrow down what was causing the error for me by using adb logcat and tracing the app.
The issue stemmed from both <Input> (from react-native-elements) and <TextInput> (from react-native). Both would cause the error, and the app would run without error if I commented out any Input/TextInput elements in the Componenets.
I wasn't quite able to get it to work with #kangear 's response, but it was close. After a lot of digging and testing, I was able to get the app to work properly with the following line of code in android\app\build.gradle, in dependencies section:
implementation ("androidx.appcompat:appcompat:1.3.1") {
version {
strictly '1.3.1'
}
}
I tried just using implementation 'androidx.appcompat:appcompat:1.3.1', but that wouldn't work either.
Hope this is able to save someone some time, as it took me quite a long time to figure it out!
I had same issue for this.
do not use +
implementation "androidx.appcompat:appcompat:1.4.0-alpha01"
or
implementation "androidx.appcompat:appcompat:+"
Correct way:(lower than 1.4)
implementation "androidx.appcompat:appcompat:1.1.0"
see here: https://github.com/facebook/react-native/issues/31572
update
./gradlew -q app:dependencies > 1.txt
maybe you can see this:
| +--- com.github.AnJiaoDe:TabLayoutNiubility:V1.1.6 | | \--- androidx.appcompat:appcompat:+ -> 1.4.0-alpha01 (*)
3rd lib content a androidx.appcompat:appcompat:+
so you must be:
implementation ('com.github.AnJiaoDe:TabLayoutNiubility:V1.1.6') {
exclude group: 'androidx.appcompat', module: 'appcompat'
}
android/app/build.gradle
paste the following code in dependencies section
implementation ("androidx.appcompat:appcompat:1.3.1") {
version {
strictly '1.3.1'
}
}
Maybe you can update react-native version to 0.68.2.
This worked for me.
Verify Gradle version: 7.0.2
I Solve This Error Simple way.
No.1) create new expo project expo init {yourProjectName}
No.2) Your previous project copy all your create folder and files and copy you will install dependencies command.
No.3) You New Project Paste all folder and files and install all previous dependencies.
Now you run Your Project npm start or yarn start.
I hope your problem solve.
Update: This solution is for those who can't afford to use Appcompat 1.3.1.
Other solutions were not viable for me. Downgrading to appcompat to 1.3.1 is not a good solution. And upgrading to 0.68.2 is also quite an effort.
I instead
forked react-native version that I was on.
made the changes mentioned here
Re-built the ReactAndroid-release.aar by following this
place ReactAndroid-release.aar in android/app/libs
And now you can use Appcompat 1.4.x on any React native version.
Tried on 0.64.3.

Error in console: ng.probe is not a function

Yesterday I updated Angular CLI and core to 8.0.0v. After that I successfully initialized a new app and ran it. Once the app was built and served on localhost:4200 I opened the console and there was an error:
ng.probe is not a function
I tried to research the issue, but there was no relevant info about it.
Actual result:
After ng serve / npm start there is an issue in the console:
Uncaught TypeError: ng.probe is not a function. Current console
state
Current angular
state
Expected result:
No error in the console
If someone is looking for an alternative to:
ng.probe($0)
In Ivy, then please try this:
ng.getComponent($0);
Found it here, https://juristr.com/blog/2019/09/debugging-angular-ivy-console/
Thought I'd add this here for completion.
Note about ng.getComponent: you must focus the component tag ( e.g. <app-my-component> ) in the developer tools elements so that it will be in $0. It doesn't search up the hierarchy for parent components ( like ng.probe does ).
If you're using Augury extension, disable or remove it. then, check the console. I've had the same issue and I removed the Augury.
Augury is having different set of debugging APIs, that's why that error occur.
Yes, augury assumes angular dev mode is active if window.ng exists, but ivy doesn't export probe right now
I have augury but after I disable the extension there is no error anymore.
You could also run without Ivy with this in your tsconfig.app.json
"angularCompilerOptions": { "enableIvy": false }
This is not exactly related to this question, but googling led me here. So, I am leaving the solution to my problem here in hopes that it will help others who face the same problem.
I was getting ng.probe not a function error when I created a angular project using dotnet sdk(version 5.0.300) and ran it locally. The project was using #angular/core v8.2.12, and #angular/cli v8.3.29.
I was able to solve the problem by update these packages using -
ng update #angular/core#8 #angular/cli#8
or
npm run ng update #angular/core#8 #angular/cli#8

Ember.js error "Cannot read property 'container' of undefined" when using Liquid Fire

I'm a beginner to front-end development and trying to utilize Ember.js for my project. I stumbled upon a great talk by Edward Faulkner about Liquid Fire at EmberConf 2015. It looked incredibly easy to apply and so I decided to give it a try.
My app is using Ember and Ember-Data Canary via ember-cli 0.2.0.
The structure of the app is somewhat like this:
application.hbs
\users
\user
work.hbs
profile.hbs
...
user.hbs
And the part of the router.js file that's responsible for this is:
this.resource('users', function (){
this.resource('users.user', { path: '/:user_id' }, function () {
this.route('work');
this.route('profile');
...
});
});
After I installed the addon with npm install --save-dev liquid-fire, I replaced {{outlet}} in my user.hbs file with {{liquid-outlet}} and added a transitions.js file with some simple transition data:
export default function () {
this.transition(
this.toRoute('users.user'),
this.use('fade')
);
}
But as soon as I navigate to the user page, I get a javascript error:
Uncaught TypeError: Cannot read property 'container' of undefined
Which originates in a liquid-outlet.js file, on line 15:
var View = this.container.lookupFactory("view:liquid-outlet");
I have no idea what I am doing wrong. It seems like there's something with my {{liquid-outlet}} being placed in the wrong place or something, but I've tried moving it elsewhere, with no luck. As soon as I navigate to a template that has {{liquid-outlet}} in it, I get the same error. Please help.
Thank you,
Oleg
This issue has been fixed in liquid fire's master branch. You can get a working build for now by pulling from git with:
npm install ef4/liquid-fire --save-dev
The next release will of course also include the fix.
Check this github issue thread for updates: https://github.com/ef4/liquid-fire/issues/190

Categories

Resources