Electron does not render anything on Ubuntu - javascript

I'm trying to run an electron app (https://github.com/JamieMagee/teams-for-linux to be precise) and while I got it to run and compile, it is now showing whatever was behind the screen - like it is literally never painting the window display.
I know that being based on Chrome, Electron is known to have graphical glitches from time to time but I'm not sure how to troubleshoot this issue - when I jump a few commits back it starts giving a JS exception and does not run at all. Is there a library I need to package or set up to get forms to render on Ubuntu 14.04?
The only warning shown while running:
yarn compile v0.15.1
$ rimraf 'app/**/*.js' && tsc
Done in 2.00s.
~/teams-for-linux/node_modules/electron/dist/electron: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by ~/teams-for-linux/node_modules/electron/dist/electron)
~/teams-for-linux/node_modules/electron/dist/electron: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by ~/teams-for-linux/node_modules/electron/dist/electron)

I also faced this issue.
This command helped me:
yarn electron --disable-gpu

Related

How to fix my app after 'npm audit fix --force'

For some context, I am a web developer by day, but in the evenings, I work on a personal project using React Native, and I'm still fairly new to it. The app was working totally fine up until a couple of days ago, and I'm not entirely what caused it. Even if I revert back in GitHub, things still do not work.
Things that I think have caused it are:
Running 'npm audit fix --force'
Or updating node, npm, or expo-cli
What I've tried so far:
I've gone back to a previous commit where the app was definitely working, tried to start the app ('expo start'), but to no avail
I've made sure the package.json, package-lock.json, and yarn.lock were all reverted, and then ran 'npm install', and the yarn equivalent (I'm aware you shouldn't mix package managers but this has been like it even when the app was working, so fairly sure this isn't the issue)
Un-ignored node_modules/ in .gitignore, then deleted them from the project, and ran 'npm install', and yarn equivalent
Tried clearing all caches (npm, metro etc.)
'expo doctor --fix dependencies'
Tried reverting expo-cli to a previous version, same with npm and node
Debugged the app with remote debugger in Chrome which I'll explain below...
Symptoms of the issue:
It seems to be at build time (I think?) because the app never makes it to any kind of components or screens:Error in iOS simulator when I try to serve my app using 'expo start' and 'i'
r/reactnative - how can I fix my app after 'npm audit fix --force'
Error in iOS simulator when I try to serve my app using 'expo start' and 'i'
The message I'm getting is 'no stack', because of a "}" symbol (pics will be included), and when I trace this down to its root using the remote debugging in chrome, the caught exception that it paused on was something like 'can't use import statement outside of a module', and the line seems to be referring to Babel module:Using Expo remote debugger in Chrome
r/reactnative - how can I fix my app after 'npm audit fix --force'
Using Expo remote debugger in Chrome
When I try to serve the app on web, I get a different Webpack related error (please see screenshots)
I won't put my package.json etc. here because it'll be a wall of text, but here's my repo if anyone would like to see the dev dependencies etc.: https://github.com/braingame-com/bg1
This has caused me so much frustration that I considered just rebuilding the app from scratch because it's not very far along anyway, but I'm really wanting to get my debugging skills up and learn what I had done wrong, rather than taking the easy way out.
What can I try next?

Terminal stops running commands after switching Node's version with nvm

Hope to find you guys well =).
So, my problem is that I'm trying to initialize a Gatsby project and after some trouble I discovered that for some boiler plate "starter" template to work I would have to install an older version of Node. Since I already have nvm installed, I just downloaded the version I wanted and switched via terminal.
I verified it with node -v and it threw me the version I wanted. The thing is that when I try to run 'gatsby develop' it says "gatsby: command not found".
And that if I close and open my terminal again it resets the version. Is this supposed to behave like that?
By the way, you can already tell that I'm new at this so any information or guidelines will be of extreme helpfulness.
You can try doing yarn develop if using yarn. Or npx develop if using npx

Project broken by unidentified subdependency: how to recover? How to `npm install` with all packages limited by a date?

My project is successfully deployed via CI and working fine. But when I build it from the same commit locally, the project freezes without any error message. It's a huge Ember app with an enormous pipeline, and I've exhausted all my debugging ideas.
My only guess so far is that an npm subdependency update has broken something. I don't know which package is to blame. :(
I have no npm-shrinkwrap.json. I tried to introduce shrinkwrapping to the team, but it was causing too much trouble, so we went back to not using it.
No other team member has an up to date version of the project locally, so I don't have anyone to ask for a fresh npm-shrinkwrap.json.
I know the date at which the project was building correctly.
How do I tell npm to install every package (including subdependencies) limited by a date (in addition to restrictions specified in package.json files)?
If I were able to do that, I could see if the project starts working again. If it does, I could shrinkwrap and identify the troublesome package.
Any other suggestions to recover from this failure are also very welcome.
PS I'm using NVM, so I've tried both npm v2 and v3 -- same result.

e2e testing angularjs with protractor (protractor interactive mode brakes)

I am learning protractor for e2e testing angularjs and having some difficulties getting things going.
Since I am new to this framework, Im following some tutorials like https://egghead.io/lessons/angularjs-protractor-interactive.
watching the tutorial I see that he checks if an element has been successfully found by *tabbing.
0:56 during the tutorial, after he puts element(by.tagName("button")) and he presumably tabs to see further options available to the button found. he doesn't tell you how he did it actually or if he tabs or not but I am guessing he's tabbing to check if newly found elements gets new available options
I gave tries too.
I made a button and input field as he did and ran into interactive mode.
element(by.tagName("button")).click()
did fine for me. it clicked the button on index.html.
However, I cannot check if the element has been found before clicking it. That means I cannot see click option by tabbing when I am done typing to the point element(by.tagName("button")).
there's more. Trying to gain access to 'click' option on command prompt kills command prompt and makes it unresponsive. I have to force quit command prompt and restart. (The pic I uploaded showing you unresponsive command prompts if you do 'b.c' then tab.)
I found it inefficient to rerun specs just to check if element has been found every time.
I would really appreciate if someone can let me know the right solution to this problems.
Thank you.
This was fixed 6 days ago and is not yet released.
So you can wait for Protractor > 1.3.1 or start using master branch.
How to install Protractor from master branch
In case you need sudo and using Protractor globally installed:
sudo npm -g install git://github.com/angular/protractor#master
I prefer to setup a NodeJS project with package.json and point to an specific Protractor version or commit, for better control:
npm init
npm install --save git://github.com/angular/protractor#ed1c75c7
mkdir -p bin
# some handy shortcuts
ln -s ../node_modules/.bin/protractor bin/p
ln -s ../node_modules/protractor/bin/elementexplorer.js bin/e
# elementexplorer sample usage
bin/e https://angularjs.org/
# Protractor binary sample usage
bin/p your-config.js

Installing Node.js ./configure make sudo make install

I am currently trying to download node.js. I have downloaded everything and am now at the part where I enter the console commands.
What I am entering:
cd node
./configure
make
after entering ./configure, i get this error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer director /Library/Developer/CommandLineTools' is a command line tools instance`
I'm not sure what this means. After entering make, i then get this repeated in a infinite loop in the console
http://pastebin.com/YrDs2Afw
in general it's a good rule of thumb to provide a bit information about what you already tried and on what system you are - especially when you are having issues with installing something.
I'll just assume, that you're working on a Mac.
I would recommend to download and install XCode as Quentin already recommended.
You can find it in the AppStore.
Once that done, make sure to install the "Command Line Tools" within XCode.
Now you have several options:
- Install Homebrew and install NodeJS from there (google Homebrew if you don't know what it is)
- Download and execute the Node v0.10.26.pkg (current version as of writing this), which will take care of the installation for you.
Hope this helps

Categories

Resources