go-plus atom package doesn't run goimports - go

This is my current version of
Atom : 1.23.3
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
go-plus package is at
go-plus 5.8.1
I'm not quite sure how to about getting this to work or figuring out the issue
format box is check to run formattool on save and the formattool is set to goimports
goimports work in my command line, so I suspect this is an issues with the package
I'm also using ubuntu 16.04, with kernel v 4.10. the newer updates doesn't detect any wifi devices

Related

OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?

Suddenly on the afternoon of January 6, 2021, my Selenium Protractor tests under OSX stopped working with the mysterious error
spawn Unknown system error -86
I did some research and discovered that error number 86 is the same as
Bad CPU type in executable
and ran the following to compare the cpu architecture of my chromedriver binary to my system:
% file chromedriver_87.0.4280.88
chromedriver_87.0.4280.88: Mach-O 64-bit executable arm64
% uname -a
Darwin kobl179273m 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
% uname -p
i386
How can I fix the chromedriver binary used by my Selenium so that it will run on my Intel x64 mac and clear the "system error -86" or "Bad CPU type" message?
The issue is described in https://github.com/angular/webdriver-manager/issues/476.
This has been now fixed in 12.1.8 so just update to that webdriver manager.
For most users this can be accomplished with
npm uninstall protractor && npm install protractor
Edit: this answer should be considered deprecated now that the underlying bug in webdriver-manager has been fixed. A better solution would be to upgrade to the newest version of webdriver-manager. The answer below may be useful if people need to use an older version of webdriver-manager which still has the bug.
As per Deepak Srinivasan's comment above, this error is caused by https://github.com/angular/webdriver-manager/issues/476
Root Cause:
The ChromeDriver team added "_m1" to the end of the filename for their Apple Silicon ARM builds of Chromedriver -- but both the Silicon and Intel versions of chromedriver have "mac64" in the filename, and the version number is exactly the same. This causes webdriver-manager to always download the Silicon build of Chromedriver, even on Intel macs. As a general solution, simply avoid using the chromedriver that has _m1 in its filename if you are on an Intel mac.
Solution 1: Downgrade to Chrome 86.0.4240.198 and Chromedriver 86.0.4240.22. These versions work together and are the most recent versions prior to the new and problematic support for Silicon ARM
Chrome 86 download page:
https://google-chrome.en.uptodown.com/mac/download/2920124
Disable auto-updates in Chrome: https://superuser.com/questions/1359017/how-do-i-disable-automatic-updates-of-google-chrome-on-mac-os-x
Chromedriver 86: https://chromedriver.storage.googleapis.com/index.html?path=86.0.4240.22/
% webdriver-manager update --versions.chrome=86.0.4240.22
Solution 2: Modify the webdriver-manager npm package to point to the correct chromedriver (thanks to ciekaway from the angular github issue page for this fix)
Modify the following file
node_modules/webdriver-manager/built/lib/files/file_manager.js
or, if using protractor
node_modules/protractor/node_modules/webdriver-manager/built/lib/files/file_manager.js
Near the top of the downloadFile method around line 166, add the following line to remove "_m1" from the name of the file:
fileUrl.url = fileUrl.url.replace(/_m1/, '');
It needs to be after the beginning of the .then block that starts with
binary.getUrl(binary.version()).then(fileUrl => {
it also needs to be before the next reference to fileUrl.
For example:
binary.getUrl(binary.version()).then(fileUrl => {
binary.versionCustom = fileUrl.version;
fileUrl.url = fileUrl.url.replace(/_m1/, '');
let filePath = path.resolve(outputDir, binary.filename());
Note that this solution is temporary. It will be overwritten by an npm install. The Chromedriver and/or the webdriver-manager team will probably fix this issue, at which point you should clear the modified version of your webdriver-manager and download the fix from npm.
For macOS Catalina Version 10.15.6 (19G73)
In my case I was working with Rails and Capybara for feature tests. What worked for me was
First, find the actual chromedriver location running:
which chromedriver
# Which returned:
/Users/alex/.webdrivers/chromedriver
Then, install chromedriver via Homebrew:
brew install chromedriver
Then, remove old chromedriver reference found at previous location with:
rm /Users/alex/.webdrivers/chromedriver
Now, link the old chromedriver reference to the one installed with brew:
ln -s /usr/local/bin/chromedriver /Users/alex/.webdrivers/chromedriver
Then, open Finder app, then click on Go menu and then click Go to folder ... option, and enter this route:
/usr/local/Caskroom/chromedriver/
There you should see a folder with the chromedriver version you have installed, something like this:
88.0.4324.96
Enter that folder and you should see the chromedriver binary file.
Right click on it, and click on Open
Now, you should get a terminal window popping up with the output:
Last login: Sun Jan 31 12:29:15 on ttys001
/usr/local/Caskroom/chromedriver/88.0.4324.96/chromedriver ; exit;
  ~  /usr/local/Caskroom/chromedriver/88.0.4324.96/chromedriver ; exit;
Starting ChromeDriver 88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b- refs/branch-heads/4324#{#1784}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Finally, press Ctrl+C to stop the execution and quit the terminal window.
Now, you should be able to run capybara tests.
npm uninstall protractor && npm install protractor
If you use webdrivers gem, upgrade it:
bundle update webdrivers

Cannot install gotk3, getting GdkMonitor error

I tried to use gotk3 for creating desktop application. I follow the instruction in gotk3 wiki and this installing-on-linux wiki to install it. But then I get this error while executing go get -v:
gcc errors for preamble:
In file included from ../../gotk3/gotk3/gdk/gdk_since_3_22.go:23:0:
./gdk_since_3_22.go.h:22:8: error: unknown type name 'GdkMonitor'
static GdkMonitor *
^
I've tried to delete the gotk3 directory, and then trying to go get -v again, but still, it didn't work.
I also checked the GTK version that installed in my Ubuntu 16.04 using apt-cache policy libgtk2.0-0 libgtk-3-0 | grep Installed. And it shows this:
Installed: 2.24.30-1ubuntu1.16.04.2
Installed: 3.18.9-1ubuntu3.3
What did I do wrong? Thanks
GdkMonitor was introduced in GTK+ 3.22. Your version is 3.18.
go get -tags gtk_3_18 github.com/gotk3/gotk3/gtk at the very beginning of building (see here NOTE section) should fix things

cannot execute binary file of golang bootstrap installer

I'm using the instructions in this blog post, which is intended for installing go 1.5 on the Raspberry Pi, to install golang on my Chromebook (which has ChrUbuntu not Chromium installed). The technique recommended in the blog post is to install a Golang 1.4 bootstrap compiler available here and then use that to build golang 1.5 (as you need a version of go installed to build 1.5). I tried this on the Raspberry pi and it worked, but when I ran this command from /go/src on ChrUbuntu
env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./all.bash
It gave me this output
env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./all.bash
# Building C bootstrap tool.
cmd/dist
./make.bash: line 121: /home/user/go-linux-arm/bootstrap/bin/go cannot execute binary file
Why am I getting this error message (is it because it's not compatible with ChrUbuntu) and how to do what I am trying to do. Thank you in advance.

Errors with cabal 1.18.1.3 in Windows with latest Haskell Platform (2014.2.0.0)

I can't use cabal with the latest Haskell Platform (2014.2.0.0). I've tried uninstalling, removing all folders from PATH and deleting cabal's library directory, and still no luck
When I run cabal from the command line in the GitBash MINGW32 shell I get the following error:
cabal.exe init
cabal.exe: The program ghc version =6.4 is required but it could not be
found.
(cabal configure, cabal install, etc. all give the same error, except cabal --version)
Now, when I execute cabal from the windows cmd, it runs fine, but when I try to do a cabal init, I get the following:
>cabal init
Package name? [default: toyrsa]
Package version? [default: 0.1.0.0]
Please choose a license:
* 1) (none)
2) GPL-2
3) GPL-3
4) LGPL-2.1
5) LGPL-3
6) AGPL-3
7) BSD3
8) MIT
9) Apache-2.0
10) PublicDomain
11) AllRightsReserved
12) Other (specify)
Your choice? [default: (none)] 3
cabal: git: does not exist
Choosing the default or other options produces the same result. Upgrading to Cabal 1.20 does not help either.
This bug was documented here: https://github.com/haskell/cabal/issues/1613 and that issue claims that it was fixed in the 1.20 series. If you're using 1.20 and still running into it (and sure you're running 1.20 and not an older binary on your path) then you definitely should report it there and reopen the ticket.
Running cabal init from the cmd can be made to work by adding git to the PATH variable. The error at step 3 disappears then. Still seems pretty weird that I need git to create a configuration file for an empty local project with no dependencies.

Webkit not found on OSX

I'm trying to compile mu that uses the headers webkit/webkitwebview.h and webkit/webkitwebresource.h. The OSX version of webkit framework located in /System/Library/Frameworks doesn't seem to have it, the headers are different and use NS data types and stuff.
So I downloaded webkit-gtk with MacPorts (since it's not available through Homebrew) and pointed $PKG_CONFIG_PATH to webkit-1.0.pc. I verified and this version has the needed headers.
But the problem is, I still get an error, the configure file doesn't seem to be able to find it.
checking for WEBKIT... no
I don't even know, actually, if webkit-1.0.pc is the package config it is looking for.
I had two other compilation problems prior to this, with glib.h and gtk.h but managed to go through. This is the last issue I need to resolve to have a fully functional email client in Emacs.
Help!
this worked for me [1]:
add this to ~/.profile (or wherever you take care of this stuff):
# ~/.profile stuff
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig/:$PKG_CONFIG_PATH"
then source:
$ source ~/.profile
then (assuming you're in the mu dir) voila [2]:
$ ./configure
[1] i have gtk installed via homebrew, installed webkit-gtk3 via macports, and cloned mu from the github repo. running os x 10.9.5
[2] here's the $ ./configure output:
mu configuration is complete.
------------------------------------------------
mu version : 0.9.10
Xapian version : 1.2.19
GLib version : 2.42.1
GMime version : 2.6.20
GTK+ version : 3.14.5
Webkit version : 2.4.7
Emacs version : GNU Emacs 24.4.51.1
Have wordexp : yes
Build mu4e emacs frontend : yes
Build 'mug' toy-ui (gtk+/webkit) : yes
McCabe's Cyclomatic Complexity tool : no
Have direntry->d_ino : yes
Have direntry->d_type : yes
------------------------------------------------

Resources