PhpStorm: Local History displays no file content (empty), but the list of local history records is displayed - intellij-idea

Local history records are displaying empty.
I use PhpStorm 2020.1.4 (But seems like the same thing was in 2020.1.2).
The host is Windows 10, Project files a stored on WLS2 (Windows Subsystem for Linux, Ubuntu 20.04)
*Git history works perfectly.
What can be the possible reason and how to fix it?

Sadly currently it does not work with \\wsl$\ kind of paths.
https://youtrack.jetbrains.com/issue/IDEA-241935 -- watch this ticket (star/vote/comment) to get notified on any progress.
UPDATE 2020-12-01: the aforementioned ticket has "Fixed" status now. It should be working since 2020.2.1 version.

Related

Oracle VM -- Metasploitable Issue "Can't Overwrite Medium..."

Thank you for taking the time to read this. I am trying to complete a Lab for one of my classes and I am having an issues creating a new Metasploitable VM. I introduced an error when editing a file in the last one and had to delete it.
I am using a VMDK, obtained from SourceForge. The first machine installed with no issues. When trying to create a second machine I continually get "Can't overwrite medium..." comment when finishing the set-up.
So far I have tried:
Checking the destination folder for any existing files and folders (hidden too).
Redownloading Metasploitable
Assigning a new name to the VM, using different specs, etc.
Restarting my PC.
What I don't understand is that the error is stating, if I am not mistaken, that it is trying to overwrite the VMDK in my downloads file... when I am trying to save it in c:\Users\natsu\VirtualBox VMs. I have triple checked all fields before running the installer. I do not understand why this is happening, considering the first Metasploitable machine I had installed with absolutely no issues.
]

AMPPS - The file /Applications/AMPPS/ampps/softaculous/includes/enduser.php is corrupted

I've had this issue twice now, just randomly happened.
When I try to view the Ammps 'Home' Dashboard I get the following error:-
The file /Applications/AMPPS/ampps/softaculous/includes/enduser.php is
corrupted.
I had to re-install to fix this last time but since then (a few days ago) this has happened again?
Anybody know why this is happening and how to fix it?
I am using Version: 3.8
Update
I've done another clean install (backed up www and all the databases beforehand). I noticed there isn't even the directory /Applications/AMPPS/ampps/softaculous/includes/.
Seems to be another effected file as well:
/Applications/AMPPS/ampps/softaculous/includes/main/functions.php is
corrupted.
Upon opening these files, it appears a massively long string of characters as been added after the closing PHP tag. Deleting this string had no effect, the same errors persist.
Anyway, I've uploaded the files of Ampps for Mac which you can download here:
https://drive.google.com/file/d/18nA-ldR5BamLLqnEU0nC4Gx-PmzWSwt0/view?usp=sharing
Going to see if I can get it back working once I merge the files together (except the www folder)
Update 2:
You can now download Ampps 3.9 from their official website:
https://ampps.com/download
1.+ don't forget to save database (/var) and domains information (/ampps/data/domains) before replacing files
Doing a clean install of Ampps 3.8 will rectify the problem which is what I had to do. Frustratingly, some people including myself have experienced the issue coming back after a few days. Until there is a permanent fix for this either by an update/patch from Softaculous, a way to rectify this without having to reinstall Ampps is by doing the following:-
Take a backup of your /Applications/AMPPS/www directory
Download the Mac files from a clean installation here;
https://drive.google.com/file/d/18nA-ldR5BamLLqnEU0nC4Gx-PmzWSwt0/view?usp=sharing
Replace the existing Ampps directory with the files from the
download link
Move your /www/ folder back to the same location
You should then be able to access the Home dashboard and everything should work as normal.
As Nika mentioned, don't forget to save database (/var) and domains information (/ampps/data/domains) before replacing files (/www)
Edit 1:
Seems my version of Ampps 3.8 got updated to 3.9, I've not had any issues since this has happened.
Please create a backup first!
Shutdown AMPPS. I have fixed mine locally by replacing the enduser.php with the one from here https://files.ampps.com/5.3.2.zip.
Then after that I have replaced all the IonCube loaders with the ones you can download from here: https://www.ioncube.com/loaders.php. Source and how-to: https://www.softaculous.com/board/index.php?tid=13497&title=Ioncube_Loader_Error
Start AMPPS.
To check if you need to replace another corrupt file check error_log in your logs folder.

How to run a script from startup on Raspbian 10 (buster)?

I have designed a GUI that I want to run as soon as I turn on my Raspberry Pi. It is currently set up to automatically log in as user on startup, but if that makes the process more difficult I can change that. My Raspi runs on Raspbian 10 (buster), which has made things difficult since I can only find tutorials for Raspbian 8 or so.
I have tried modifying autostart folder, but it is not in the same location as it was in previous Raspbian versions and doesn't seem to be working the way it used to. Tutorials have said to create a .desktop file in /home/pi/.config/autostart but I don't have a .config folder, or at least it's hidden. For me, autostart is in /etc/xdg/autostart and when I try to create a new file here using nano in the terminal, I get the message [Directory '/etc/xdg/autostart' is not writable] and it doesn't save my file.
I have also tried calling my script in /etc/rc.local but it did nothing. Some have said it doesn't work for GUIs.
Here's what I type into terminal:
$ nano /etc/xdg/autostart/gui.desktop
and a new file pops up, but at the bottom I get the warning [Directory '/etc/xdg/autostart' is not writable]
How can I get my GUI script to run on startup with Raspbian 10 (buster)?
There are a number of issues here, first when you are looking at tutorials recognize that Linux distros are built in layers, for simplicity let's say your "layer stack" looks like this: kernel, systemd, x11, xdg, lxde. The kernel boots, then starts systemd, which then starts x11 (and a lot of other stuff), x11 starts xdg (and some other stuff, I think), lxde is started by either x11 or xdg I'm not sure which.
You want to add something to this process, you can do it at the kernel level (bad idea), at they systemd level (probably not right unless its a daemon), at the x11 level (still probably bad as you still don't have a user session yet), or at the xdg or lxde level.
xdg is probably the right place as it has all you need ( a gui, a user session) while being common (xdg will still work if you switch window managers, probably)
With that out of the way, why isn't your solution of modifying xdg working? It's because '/etc/xdg/autostart' is a system configuration directory. Any changes made to it will apply to all users. You may want this, but the system is trying to protect other users on your system and only allows root to make changes to everyone. If you want to do that use "sudo" (documented elsewhere on stack exchange and the internet). If you want to do it just for you use ~/.config/autostart, (https://wiki.archlinux.org/index.php/XDG_Autostart) you might need to create that directory with "mkdir ~/.config/" and then "emacs ~/.config/autostart"
Would it be better to have the python program run in a terminal window from startup? That way you would see what it is doing in case of errors.
If so, perhaps check this out https://stackoverflow.com/a/61730679/7575617
By the way, in the file manager, hit CTRL+H to toggle viewing hidden files and folders.

Odoo 12 - XML files not triggering server reload with --dev=all

New Odoo user here.
It's been a few days since I started messing around with Odoo(v12). I managed to build a module, including creating models, views and menus. It's working like a charm, though there is one issue that is really bothering me.
I've read that running odoo-bin with the --dev=all arg -- which requires watchdog, by the way -- is supposed to trigger a server restart whenever .py or .xml files are changed inside one of the addons folders.
The server does restart when I modify PYTHON files, but so far, even after trying it out for hours, I can't seem to make the same thing work for XML files.
For reference, I'm building the openacademy module from the official documentation, and I'd like for the server to read the views from the XML files instead of the database and reload on change, so I can customize the forms and views and see the result without having to upgrade my module every single time.
--dev=all, unfortunately, doesn't seem to work.
Can anyone help?
Edit: here's the full command I'm using to start up Odoo:
py odoo-bin -c odoo.conf --dev=all
P.S: I'm running Odoo 12 source on Windows 10 64bit
--dev=all actually works in conjunction with watchdog, so if you have watchdog package installed in your running odoo python environment, any change in your addons .py file with cause watchdog to notify running server and the server will reload automatically. You can actually see those messages if you have loglevel set to info. In case view update, changes in xml file doesn't actually reload the server but causing a refresh in the browser automatically updates the view. But, if there is any error in the view definitions, i faced this situation that odoo is not updating the changes. So make sure that there is no error in the xml views and update should be done automatically after page refresh.
Late to the party but as I spent a lot of time trying to figure this out on both Mac and Ubuntu it's worth noting that the --dev xml does not update to reflect every change in a .xml file. I was modifying menus and seeing nothing and thinking it was broken but from some investigation I discovered that the changes only pick up modifications to ir.ui.view models and (I think from looking at the source code) ir.rule models.

Oracle virtual box inaccessible

I am using Oracle Virtual Box version 4.2.16 r86992. Everything was fine until yesterday shutdown.
Today, it shows inaccessible and throws this error:
Runtime error opening C:\Users\xxxxxx\VirtualBox VMs\vBoxxxxXubuntu_Beta\vBoxxxxXubuntu_Beta.vbox for reading: -102 (File not found.).
D:\tinderbox\win-4.2\src\VBox\Main\src-server\MachineImpl.cpp[725] (long __cdecl Machine::registeredInit(void)).
It's good to restore this to working, It would save lot of time and restore configuration settings and data. Thanking your support.
This normally happens if the host OS crashes or you pull the plug on it, leaving the .vbox file unsaved.
In the location:
C:\Users\xxxxxxx\VirtualBox VMs\vBoxxxxXubuntu_Beta\
you should find two files:
vBoxxxxXubuntu_Beta.vbox-prev
vBoxxxxXubuntu_Beta.vbox-tmp
Copy vBoxxxxXubuntu_Beta.vbox-prev to vBoxxxxXubuntu_Beta.vbox.
Select vBoxxxxXubuntu_Beta.vbox, in the VBox manager, right click, and then left click on refresh.
Observe that it now shows Powered Off.
Now you are good to go.
Based on my experience, I was on Windows 7 and running Ubuntu 14.04 as guest OS on Virtual Machine.
Go to your Virtualbox folder (in my case):
C:\Users\Dev12\VirtualBox VMs\Ubuntu
You'll see files with extensions: Ubuntu.vbox-tmp or Ubuntu.vbox-prev
Remove -tmp from file name Ubuntu.vbox-tmp so that it reads as Ubuntu.vbox
Exit from Virtual Machine and start it again.
You should now see error gone away.
The virtual box files with extension .vbox contain metadata the virtualbox hypervisor requires to resolve the guest virtual OS' configuration.
If the main .vbox file is corrupted (i.e. reporting that it is empty) then use the backup .vbox-prev file to recover the contents of the original file.
Do this by renaming the empty .vbox files a temporary name (e.g. rename originalVM.vbox to originalVM-empty.vbox).
Then make a copy of the backup file originalVM.vbox-prev, where the copy will have the same name as the original but with the word "copy" appended to it (i.e. originalVM.vbox-prev is renamed to originalVM (copy).vbox-prev).
It is important to retain the original backup .vbox-prev file it should not be altered or itself renamed.
Now go rename the copy of the newly created .vbox-prev file originalVM (copy).vbox-prev to the original name of the empty .vbox file and be mindful to also change it extension from .vbox-prev back to just .vbox.
That is rename originalVM (copy).vbox-prev back to originalVM.vbox. Now that this is done you may add the .vbox file (guest os) back into the VBOX hypervisor. This will recover the state and snapshot of the "inaccessible" guest VM. Now delete the original empty .vbox file.
I've faced the same issue using CentOs 6.8 on a VirtualBox 5.1 installed in Windows 7 and AjayKumarBasuthkar's solution worked perfectly for me:
I went to C:\Users\\VirtualBox VMs\CentOS6.8
Made a copy of the file CentOS6.8.vbox-prev and gave it the name of CentOS6.8.vbox
Went to the VirtualBox GUI, right-clicked the VM instance and hit refresh
The CentOS instance went from the State Inaccessible to Powered Off
VirtualBox 4.3 is released and could it be that you've updated or there was some issues while updating?
In any case if you are not able to bring up the Virtualbox, remember to backup the VirutalBox VMs folder and going for a fresh install should be the best way forward.
I faced the same problem and I resolved by doing following in Oracle Virtual box 4.3.28 with Ubuntu 14.04 LTS, when Virtual box VM was closed.
Removed ubuntu.vbox to another folder outside virtual box folder
removed -prev from file ubuntu.vbox-prev
start oracle virtualbox, it works excellent.
On a Windows 7 Host, I found that Daemon Tools service had a hold on the file.
The solution was to uninstall Daemon Tools, but I suspect if you stop the service and remove the file association, you would be sorted.
The other issue might be that if your Virtual Machine was on an external hard drive, it is possible that the drive letter has changed. If so, go to Computer Management, and select the hard drive and right click to change the drive letter and save (Note that this is for Windows).
This is going to sound stupid but try to reinstall VB. It may work.
I am adding one critical and important comment to the previous great answers. Make sure that the original .vbox file is corrupted and empty before you copy the content from the.vbox-prev file. If it is not the case and you find it with lines and readable content, don't replace the content of the .vbox.
Changes made to the VM directly before the VM got inaccessible might not be updated in the .vbox-prev backup file . The changes could not be synced with those changes before the OS upgrade or system changes that led to the inaccesable issue.
If you find your VM not accessible after an OS upgrade or system change, first check the.vbox file if it is still readable by a text editor and it has lines. Then you just need to delete the VM from the VirtualBox manager list(just remove the appliance from the list and don't remove files) . Then reopen the.vbox file and it should work perfectly.
If the original.vbox file is corrupted or empty when you open it with a text editor, then and only then, you can copy the content from the .vbox-prev and follow the instructions highlighted.
This was my experience, and I wanted to share it with you to avoid losing some last minute changes before the OS upgrade or crash.