General troubleshooting
Just a big heap of problems and mostly solutions. I will try to divide in some sensible chapters, but the main aim is to make it easily search-able and therefore it is a single html page. The form will be :
Hardware problems
Keypad problems
When the keypad seems to fail and you also experience problems focusing windows as well. Check if you have enabled the pointer by keypad. Push and hold the 4 and see if the mouse pointer moves right !
If so, you can disable it here :
System => Preferences => Hardware => Keyboard => "Pointer can be controlled using the keypad"
Networking problems
Error
RTNETLINK answers: File exists
symptom
When bringing up network interface. Additional info : this was a virtual machine with a new eth port added after installation. The second port (eth1) gave this message whenever you 'service networking restart'
Diagnose
This link helped me : visit
cure
Restarting the network did work after this flush.
Software
Virtualbox problems
VBox does not startup (at least from vagrant) and when you type VBoxManage --version you get :
Error
WARNING: The character device /dev/vboxdrv does not exist.
cure
| reconfigure | |
|---|---|
At least now the gui starts up again, but in my case vagrant still complained :
Error
Progress state: NS_ERROR_FAILURE ... failed to open /dev/vboxnetctl
This is probably related to the previous problem, but one symptom is that the VM does get created, and you can even start it from the VirtualBox gui. Restarting virtualbox solved this in my case :
| restart vbox | |
|---|---|
Virtualbox usb get's hijacked by OSX
Big problem on OSX, it grabs the usb before the guest can see it. Very annoying is that if you eject it, the guest will see it for a short time,. then the host grabs it again.
cure
The correct way of doing this is simple, but keep this order :
- plug in the usb stick, so it is in the virtualbox list
- create a filter for your VM (powered down) in settings->ports->usb
- unplug the usb
- startup the vm
- plugin the usb stick.
- Hopefully OSX will keep it's dirty hands to itself now.
nfs mount
Error
directory can be mounted but not written to
diagnose
/etc/export entries with no ipaddress
cure
Having an entry like directory *(rw) fails on the latest debian, altering it to directory (rw) mounts ok, but you cannot write. It really has to be an entry like directory 192.168.200.0/255.255.255(rw) to be able to mount from more machines
nfs mount 2
Error
mount: 10.10.180.45:\/rpool\/vmwarenfs failed,
diagnose
reason given by server: Permission denied
cure
this was a solaris machine exporting the directory with rw=10.10.0.0/255.255.0.0 but probably the match was given by hostname not ip so changing it to rw=* worked
compiling VRPH-1.0.0
!!! error "Need PLPLOT to plot solution".
After issuing ./bin/vrp_rtr -v -f test_instance.vrp -plot -out file
cure
| install libplot | |
|---|---|
But that is not enough, you need the alter the make file somewhat like this :
HAS_PLPLOT= 1
ifeq ($(HAS_PLPLOT),1)
PLPLOT_INC_DIR= -I/usr/include/plplot
PLPLOT_LIB_DIR= -L/usr/lib/ocaml/lib
#PLPLOT_LIB= -lplplotd -lqsastime -lnistcd
PLPLOT_LIB= -lplplotd -lqsastime
PLDEF=-DHAS_PLPLOT
endif
Of course your location could be different. The libnistcd.a could not be found (anywhere), but commenting it revealed that is not needed anyway.
vagrant tries to install rsync
symptom
Some of these boxes come with a synced_folder pre-installed, but not rsync. So the first thing it tries to do is install rsync but behind a proxy that times out forever.
diagnose
This does not work when you are behind a proxy.
cure
Now if you need a proxy anyway you can use vagrant-proxyconf :
| vagrantfile | |
|---|---|
But... sometimes you don't, in my case a VM that tested the repo.rinis.nl|net servers. You can also disable the synced folder with :
| vagrantfile | |
|---|---|
android
R.java problems
When compiling a resource related to the struct R. cannot be found. This can have multiple causes. Please note that you do not need eclipse to regenerate R.javaThere will be a number of s.d.c. sections.
Error
Unresolved symbols related to R.java or class R
diagnose
R.java is nowhere to be found, it should be in gen/yourhierarchie/R.java.
cure
Run ant clean ant release And look closely at the output, if it says : [echo] Handling Resources... [aapt] No changed resources. R.java and Manifest.java untouched. Try touching the layout.xml file and try again.
symptom
The file R.java is there and seemingly correct, still unresolved member of R.
diagnose
Possibly : The package is incorrectly added, i had my source file import import android.R While R.java clearly said : package org.klopt.android.dice;
cure
I changed the import to import org.klopt.android.dice.R;
Error
not enough space on device when pushing to /system/app
cure
add -partition-size 1024 to the command line options in the debug/run configurations (under target)
stdlib.h
symptom
ezxml.c:25:20: fatal error: stdlib.h: No such file or directory
cure
Unsolved as yet
git svn
Error
git: 'svn' is not a git command. See 'git --help'.
diagnose
git svn is a feature of the git-svn package.
cure
| install | |
|---|---|
Error
Unable to get system library for project
cure
Enable one of "project target builds" in projects->properties->android
Could not choose an EGL configuration.
The android emulator for x86 Virtualbox always starts with an non-fatal error:
symptom
Error
E/flutter ( 4836): [ERROR:flutter/shell/platform/android/android_context_gl.cc(165)] Could not choose an EGL configuration. E/flutter ( 4836): [ERROR:flutter/shell/platform/android/android_context_gl.cc(49)] EGL Error: EGL_SUCCESS (12288)
Though they are not fatal, they do appear to be. In my case the app crashed for a different reason and these error are just completely misleading.
diagnose
The emulator does not appear to implement opengl completely.
cure
It seems androvm did implement these correctly, but it is a commercial solution. So I just go with the errors for now.
tool you are currently running is from a different Flutter repository
Inside android studio and on the commandline you get this error:
symptom
Error
Warning! The 'flutter' tool you are currently running is from a different Flutter repository than the one last used by this package. The repository from which the 'flutter' tool is currently executing will be used instead. running Flutter tool: /home/kees/flutter previous reference : /home/kees/Install/flutter This can happen when you have multiple copies of flutter installed.
diagnose
You ran the build from the command line from another location, note that it does not matter that it's the same version.
cure
Just altering the path and rebuilding is not enough. Also run this command:
| upgrade | |
|---|---|
Android INSTALL_FAILED_UID_CHANGED
When an android app removal went wrong somehow.
symptom
You get that message while there is no app anymore on the device.
diagnose
Probably the uninstall failed or was incomplete.
cure
On the device as root remove the data directory for the package:
Warning
rm -rf does not seem to work on android, try to find a way to remove a directory tree. In my case attempting to get the directory deleted I probably deleted enough files to make things work again.
Hplip printer driver
On localhost:631 printer queue :
| error | |
|---|---|
And no printing is done.
diagnose
Unknown cause. see cure
cure
Reinstall the printer, delete it first it's pending jobs will be deleted. Then add it again and retry. Don't forget to enable the printer again (See next point)
Greyed out print button cups
Error
print button greyed out
When trying to print from the print dialog, you cannot push the print button.
diagnose
The printer has been disabled for some reason
cure
Go to "system settings", "printers", "unlock", set the switch to "on".
Dutch spell check openoffice
Language Dutch is an option in openoffice for spelling check, but it simply does nothing. Simple check, right click on an obvious wrong dutch word, there should be an alternative, there is not!
diagnose
It is not installed in libreoffice, you need at least myspell and l10n dutch for this to work.
cure
| install | |
|---|---|
solaris virtualbox resolution
Error
Solaris resolution remains 1024x768 even after installation of guest additions
diagnose
In all probability, choosing the VESA install is what makes it fail. Choose the default "Oracle Solaris 11"
Don't use the VESA version.
fullscreen xterm
Error
You hit some key combination and now xterm is fullscreen (borderless) and impossible to get small again.
diagnose
It was ALT-Enter you typed.
cure
Type ALT-Enter again to get your normal size back, now it is a feature not an nuisance ;-)
ingres_connect() failure
Error
PHP Fatal error: ingres_connect(): Unable to connect - II_SYSTEM is not defined
diagnose
You have not run the environment script for ingres
cure
. /opt/Ingres/IngresII/ingres/.ingIIs
Un-executable bash scripts
A file called bag.sh has been made executable :
| show file | |
|---|---|
| output | |
|---|---|
Still running it gives :
diagnose
The file system it is on was mounted 'noexec'.
cure
Edit /etc/fstab and add ,exec to the mount line, or change it to defaults:
| fix | |
|---|---|
Becomes one of :
Frozen web page
Error
You open up a web page, and the cursor turns to waiting. Also you can not scroll down which is the most annoying thing on earth.
diagnose
Last time this happened i got an error message from the flash player. So it is most likely that the flash player is loading stuff for advertisements etc.
cure
For now, i tried enabling AdBlock, get back on me with that. It might be needed to disable flash altogether, and enable it specifically for youtube and google maps.
google map not filled
Error
Google maps api, you create a map canvas with map, but it only shows decorations, the zoom bar, google trademark etc, but the rest is a grey screen.
diagnose
I particularly used this style setting : * { overflow: auto; }
cure
Do not use that for all elements, if you need overflow auto , do it for what you need but don't capture the google map like this.
mysql
access denied
Error
MySQL: Access denied for user debian-sys-maint@localhost
Even for a simple: /etc/init.d/mysql status
diagnose
Debian/ubuntu resets the maintenance password with each update, but consequently keeps reading the file : /etc/mysql/debian.conf To get the password, now out-of-date.
cure
Open /etc/mysql/debian.conf and copy the password, then :
GRANT ALL PRIVILEGES ON *.* TO '<debian-sys-maint'@'localhost>' IDENTIFIED BY
'xxxx'; FLUSH PRIVILEGES;
Of course that should be the password you copied
terminate called
Error
terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted
diagnose
Wrong locale setting
cure
export LC_ALL=en_US.utf-8
Error: Can't open display: localhost:10.0
When using ssh -X on Centos7 it should be possible to open any x client but that fails. If you grep 'display' in /var/log you also will see these messages in /var/log/secure :
| error | |
|---|---|
This turns out to be solved with this setting in /etc/ssh/sshd_config :
| sshd_config | |
|---|---|
Restart sshd with :
| restart | |
|---|---|
Fixed it for me, note : put this in the ansible scripts. Also... install xeyes to test, i suspect that it triggers the installation of a lot of needed serverside code. And of course it's the easiest test.
clipboard problem
problem
Copy+paste with the middle button does not work as expected.
symptom
When you try to paste the highlighted text in an xterm it works, when you enter vim in that same xterm, it pasts some other/older text.
diagnose
It seems to be a vim issue, see cure for solution.
cure
Add his line to the main ~/.vimrc file. You can also type this commend directly with :set mouse=r, that will work directly.
| ~/.vimrc | |
|---|---|
Todo
Can we add this setting system wide !?
vagrant authorization problem
problem
This happened after upgrading vagrant to version 1.8.5, due to the previous problem.
symptom
And so on...
diagnose
If you login to the box (that starts up ok) and go to ~vagrant/.ssh you will see that the authorized_keys file has the wrong permissions :
cure
So changing that would help, actually try it while the startup is still looping :
| fix | |
|---|---|
;-) But you would have to do that each time. So you could also add these to the vagrantfile :
| permanent fix | |
|---|---|
color swap/switch problem virtualbox + rdesktop-vrp
problem
I start an rdesktop-vrp session on servert to be able to run for instance virtualbox. But that starts out with blue and red colors reversed. Green seems ok so also all white parts are ok.
symptom
start up rdesktop-vrp on servert
| rdesktop on servert | |
|---|---|
All seems fine, until you startup virtualbox. In the interface itself and all VM's created the colors red and blue are swapped. The new button is orange and should be blue, and the settings button should be exactly the opposite.
diagnose
No real diagnose but it has to do with the color depth see cure next. These commands (-a is the color depth in bits per pixel) fail:
| color problem with | |
|---|---|
cure
What helps is keeping the color depth below 24, so it has to be 16 (8 looks horrible)
| fix with lower color depth | |
|---|---|
You can already see the loss of depth in the background image of servert, but since rdesktop recommends 16 bits for performance anyway, i could live with this.
Important
Note also that if you don't logout cleanly, the remote session stays on, and can even be restarted from another terminal. However if you change any of the parameters like -a or -g a different session will be started.
When you cannot reach a virtualbox session or see that your new chrome tabs are opened somewhere else, try to restart the other session, or restart the xrdp server.
rdesktop-vrp missing windows
problem
You cannot find the windows you opened in a rdp session.
symptom
Logged into a rdesktop-vrdp session you cannot open a virtualbox session, or for instance a chrome window.
diagnose
The windows are already open in another session, or in the case of chrome it opens up a tab in a chrome window in another session.
cure
Every time you startup rdesktop-vrdp with different parameters you get a new session! You need to log out and not ctrl-C to get rid of them.
First show the sessions on the remote machine :
As you see the command line options are visible here as well. To startup these sessions you should type :
| different size different sessions | |
|---|---|
The first one is the default resolution so you would reconnect that. Once inside you now neatly stop the windows and log out. If you run the ps command again the sessions will disappear. Maybe best to start the session always like :
| always start like this | |
|---|---|
Since this solves the colormap problem as well. See previous chapter.
nodejs mongodb
For the nodejs mongodb module.
problem
When using node js code that previously worked on mongodb. Especially with version of both mongodb > 3.0 and the nodejs mongodb driver above 3.0.
symptom
The error typically occurs when trying to get a collection :
Error
TypeError: db.collection is not a function
diagnose
The driver has been modified. Where previously this would yield a usable database object :
| connect mongo | |
|---|---|
cure
it is now changed in structure , the db member has been changed into a get function. You now need to do this :
| connect mongo | |
|---|---|
Note that the .close() function is still on the old object.
problem
Python crashes with some cryptic error see symptoms.
symptom
diagnose
Python tries to convert to Unicode but fails.
cure
Add this at the top of the offending file :
problem
Visual studio code (vscode) causes slow rendering of all windows
symptom
Just slowness as soon as it get's started, even without any extensions running. Test : open up an xterm and start top. It is not able to draw that without flickering.
diagnose
The Electron shell used by Visual Studio Code has trouble with some GPU (graphics processing unit) hardware acceleration.
cure
Startup vscode without the gpu, best put this option before the shortcuts to avoid having the type it always :
| faster windows | |
|---|---|
problem
Vscode insists on closing comments whenever you start them. For instance in html , typing
cannot be done without vscode making it :
diagnose
Very poor design. The vscode creators don't care about their users, this problem was reported in 2016 and nothing has been done.
cure
There is a workaround, go to the languages files :
| hack around it | |
|---|---|
Find the section on autoClosingPairs, and remove the line with the "". Sadly you need to find that part for each and every language. Emptying all of the autoClosingPairs sections in all languages would be a fine solution for me. A restart is needed for this fix to work.
problem
Can't open x window on remote display, 'the old fashioned way' (xhost+)
symptom
Error
Error: Can't open display: 192.168.2.45:0.0
diagnose
Today the xserver does not listen for tcp connections by default anymore.
cure
There is a quick and a long solution, the quick one is logging into the remote server with -X, the x events are passed by ssh for you that way. There is also a -Y version which "Enables trusted X11 forwarding." This one is subject to less scrutiny from X.
If you want a server to display content on your display :
The other permanent way with xhost+ : First find the program that starts up the X server, normally the windows manager.
Results in a line that mentions the display manager : lightdm.
| output | |
|---|---|
When you get another display manager some more googling will be in order, but for lightdm you open up /etc/lightdm/lightdm.conf and set this :
| lightdm.conf | |
|---|---|
And restart X
| restart | |
|---|---|
Check if port 6000 is now open :
| check | |
|---|---|
Ok, 6000 is open, Allow on the server :
| allow | |
|---|---|
And set the display on the client :
Works for me !
stop android popup
problem
When an android phone is plugged into debian, just to charge you get regular annoying caja windows opening when it is mounted. The most annoying part is that it keeps on doing that spontaneously probably because android got unmounted for some reason ?
symptom
A window pops up NEVER when you want it to.
cure
Most solutions seems to be aimed at stopping the mounting, they never work by the way. But i just want caja to shut up, so that is what you need to do. Open up caja for instance : "Places -> Home"
- "Edit" -> "Preferences" -> "Media" -> "Browse media when inserted"
Set that to off at least, but also the option above that seems quit appealing:
- "Never prompt or start programs on media insertion"
I set that to on as well. Now unplug your phone and re-plug it, you are FREEEEEE
malformed/Bad header
problem
Using apache as a proxy for fastcgi, this error is printed in the apache logs :
symptom
The service does not work, and a 50x internal server error is returned from apache.
diagnose
It turns out i tried to return this message :
| output | |
|---|---|
All the headers are really in the way, just the json should be FCGX_FPrintF() 'ed onto the output stream.
Important
Do not attempt to return the status in fcgi, just always rely on 200 OK to be returned and pass a jsonrpc error status + message to the client.
cure
Just do this :
| fix | |
|---|---|
All headers, including the Content-Length will be added by fastcgi.
FCGX_Accept_r falls through
Note that there is a standalone version and a web version !! The web version only runs under apache (and probably nginx) and that directly exits the FCGX_Accept_r() function !! The standalone version is now the default since we distribute via docker !!
The difference is in opening the engine, with or without a socket!!
| fix | |
|---|---|
The parameter -DSTANDALONE has been replaced with -DWEBVERSION.
Warning
Note that if we want to provide an API, it might have to be a WEBVERSION again.
mplayer stops playing
At first it seems the whole sound card is dead, but starting vlc (or a game) proved otherwise.
It seems i hit the m button and that mutes mplayer !! You can unmute again with the m key as well, or when in doubt 9 and 0 change the volume down and up ! Of course you have to focus the mplayer window for these keys !!
gdb starts with warnings
They look like this :
One hint on the webz states that this is because we have not install the debug version of all libraries we use. In the gdb documentation : visit
In short it says that every executable can have it's debug info in a separate file, since sometimes debug info is even larger than the .exe itself. To find that file, there are some rules and one of that is to use the unique 'build-id' that the linker gives the executable. In the above example this build-id is for instance 516f5a44b9f34f22234c050718f8ecde3ee03a07. It then looks for a file in /usr/lib/debug/.build-id/ in the sub-directory 51 (first two digits) and then the file 6f5a44b9f34f22234c050718f8ecde3ee03a07.debug. There must be some corruption in that file or in gdb because it still can't find a build-id. So pragmatically :
Important
The solution was upgrading gdb to the latest version.
json-c memory leaks
json c works with reference counting, but it is very hard to detect where a bit of data gets lost.
Important
work step by step from outward in, and run valgrind each step
For instance a problem where i wanted to replace a member from a parsed piece of json.
- read the json into root
- see if member 'id' exists in the root
- if so json_object_object_del() the 'id' member
- create a new json "id" object with a new value
- add the object to the root
- json_object_put(root)
- json_object_put(id member)
json_object_put() lowers the reference count and frees if it reaches 0 The problem here was that i wanted to put/free the id member, and it get's freed as well if you 'put' the root.
Warning
So this reference count cannot handle double frees !!
You find the error best when you comment out operations in the middle :
- first comment everything between reading the root and putting the root // 0 leaks
- uncomment the test for 'id' // 0 leaks
- uncomment the delete 'id' object // 0 leaks
- uncomment create the json_id // 1 leak
- uncomment 'put' json_id // 0 leaks
- uncomment add json_id to root // memory error double free
- comment the put json_id line again // 0 leaks
For larger instances than this it will be vital to do it like this.
libcheck strange behavior
Debuggers not starting, text not printed, valgrind reporting nothing or many leaks.
All this is usually because libcheck is working in forking mode. There is one major fix for this, use it during debugging :
| no fork | |
|---|---|
You will notice in stack-traces the tests will now start as :
| output | |
|---|---|
page down does not work
An xterm opened on hoek worked fine, open vim or a man page, page down works. Now I logged on to a another machine (lvnl kickstart) and there the page-down not only failed but also caused hangups for about 6/7 seconds. To test, see what is in the TERM variable.
It is obvious which one is better, in this case it was a sun setting from the .bash_profile file from lvnl which explicitly set it to vt100. Remove that line.
sound sticks going idle
The only problem with these speakers. But a biggie. They go down while there is no sound played, or even when the volume goes below a certain level. They then need to get sound for about 4 seconds to get on again, making them unusable for desktop speakers (for instance sounding incoming video calls etc..).
There is however a simple solution, create a almost silent wav file with
tools/kalarm:sox. And play it in crontab
:
| crontab | |
|---|---|
This would play it every 2 minutes. But please note that is probably too short and you will hear it during the music. The current playing song will tremble.
So it would help to find out after how long the power down actually occurs, since the less it plays the better.
Important
When idle the speakers turn off after 4:30 minutes.
The shell file itself should read :
This is the working setup for debian/bullseye in 2020. Just note that making the volume higher (-v 2) just makes it audible and irritating, -v 1 does the tricks silently. You can always see by the speaker light if it works or not.
npm install segmentation fault
One suggested solution :
Did not work ... however note that this was inside one directory :
So in this order :
Maybe all of the above are needed, but this works !
npm audit NEVER works
I have yet to get an audit perfect installation of angular. Here is an attempt to get it spec-less !!
| audit | |
|---|---|
Still no success (EVER) !! To get it as clean as possible, you could rebuild the complete package.json file by just removing all dependencies inside package.json.
Now beware that you will have to start adding all packages that don't resolve, so it will be a lot of :
Until you have all problems fixed.
CLI is only compatible with
The problem looks something like.
Error
Error: This version of CLI is only compatible with the Angular version but found instead
Here is a solution for this :
In short , i did this :
Now you may be left with ugly yellow warnings, but a working website, see next section for the warnings.
CommonJS or AMD dependencies
Error
WARNING in X.js depends on 'rxjs-compat/add/operator/map'. CommonJS or AMD dependencies can cause optimization bailouts.
It is advised to avoid dependencies on CommonJS and AMD because they may prevent bundlers to work correctly. But if you don't really care about the bundle sizes, here is how to disable the warning.
After setting the module parameter in tsconfig.js to "CommonJS" (it was "esnext"), the one about rxjs-compat disappeared.
Warning
But this causes faker to stop working !! Do not use commonjs as module.
There is as yet no solution to disable this warning for @firebase/ which still appear.
For firebase there is probably not yet a solution in combination with angularfire, because on the firebase site there is definitely different ways presented to import the module : visit
In short :
| commonjs vs AMD | |
|---|---|
Important
Since the older versions of firebase not only lack this warning, but also the new ones do not work (see next chapter) we reverted to older versions.
Important
NEVER just update npm modules before you have a working and tested version, it takes too much time !!
AngularFireAuth NullInjectionError
This is a showstopper, since you cannot log in anymore. The complete error in the javascript console is :
| error | |
|---|---|
If we concentrate on firebase, these are the differences in version :
| versions | |
|---|---|
My first attempt is to see if these extra ones are used/needed :
This does compile, but gives the InjectionToken error, so reverting all versions is a good next, change angularfire2 to the old version. But also it is noticeable that the version number of angularfire2 and @angular/fire is exactly the same, and indeed on the visit the site it says that they are now @angular/fire !
We seem to be able to keep the latest fire version so this is the working set:
Now do not attempt to upgrade @angular/fire until they fixed this !!
ExpressionChangedAfterItHasBeenCheckedError
Angular problem on te planner app :
On first startup this message is printed in the console of chrome, it says the width has changed from 4.888888... to 4.7 in the TripComponent.ngFactory.js file.
Read this page, also it links to yet other interesting pages, so it might be of use to read that whole tree one day :
The short version of this part is that angular evaluates the dom tree recursively, and remembers the values going down and compares them with the values 'coming up'. So for some reason(see below) the width has been changed in the lower components from 4.888 to 4.7 and it seems to be a rounding problem.
Important
This reason is now clear that it is the scroll bar that is added at the last stage ! It changes the effective width a little.
More on this
programming/angular:ExpressionChangedAfterItHasBeenCheckedError{.interpreted-text
role="ref"}
postgres compilation error
Symptom :
| error | |
|---|---|
This only occurs when compiling with :
I am sorry that i have no solution since i solved this by reverting back to libpq (C) completely. In alpine there is no libpqxx available, so we have to compile it every time and drag the code along also with our code. It just is not worth the effort. All function calls are transferable 1 to 1 so this really took about an hour to revert. This hour was won back the very first day immediately since we can now scrap libpqxx and postgresql from the 3pty code.
Important
If you want to used small docker images (alpine), do NOT use libpqxx, use libpq.
sphinx rtd theme
This was by far the nicest looking theme i could find for sphinx. But it does have one big problem : the search does not work.
If you type a search term, it will say "Searching" and never return with an answer. Watching the javascript console, you will see 1 (or 2) errors.
Cross origin request
Let's start with a 'harmless' one.
Error
XMLHttpRequest cannot load file:///home/kees/projects/doc/build/html/searchindex.js. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
This is purely cause by running the document site from the filesystem and not under apache :
'<file:///home/kees/projects/doc/build/html/index.html'_>
As opposed to the apache version : '<http://localhost/doc/index.html'_>
The last one will work without the warning.
Add missing SOURCELINK_SUFFIX
This is a show stopper however, and only occurs in this theme because it is missing a setting. The full error is :
Error
It can be fixed with 'this patch visit
But i can imagine having to alter code each time you install this is less desirable so here is a way to use the master branch that contains this fix.
Checkout the code :
you now have a sub-directory sphinx_rtd_theme in you project dir. Check to make sure the fix is present in the file sphinx_rtd_theme/sphinx_rtd_theme/layout.html:177 Remove the pip theme because it is buggy anyway :
| install with pip | |
|---|---|
Now alter the conf.py file so it will look in the source/_theme directory.
html_theme_path must be an array, and it is relative to the config directory. To allow for more themes to be used, i chose for a themes sub-directory with link(s) to the themes so :
Now you could also try to make an own theme by borrowing heavily from sphinx_rtd_theme. Since Feb 2017 the theme has now been added to the doc source tree.
Extension error
This happens sometimes after installing sphinx with pip.
Error
It seems this is a problem with the python-requests package. It is debian related, and you should not use the one from apt-get. Not sure what the exact problem is, but the solution was here : visit
However not exactly because on default debian python is installed but not pip, nor easy_install. So you first DO need to install pip the old way to get pip and easy_install: So actually these steps leading to failure are needed anyway :
First ruin things:
Now fix things :
| repair | |
|---|---|
That last one is because there us markup in the search list if you don't use that extension./ Spelling check : visit RTD Read the docs theme : visit I installed some more extensions since we use them for sphinx. Working!