Someone sent me this image today. This is only a scratch on the surface of what the junior devs I supervise go through on a daily basis. All old massive Java systems seems to have turned out like this 10 years ago when the first magician discovered the magic combination of beans, abstraction and reflection.
Wednesday, February 8, 2017
The Magic of Java EE overuse
Saturday, July 2, 2016
GoogleAuthException: INVALID_AUDIENCE
I've been having some problems getting an Android app to properly authenticate with my app engine backend. For like weeks, spending the evenings looking through every single google result and trying out different combinations of peoples experience. Today, I finally figured out what my mistake was and I have to write this down.
The problem lies on this page and in this statement.
This is WRONG! It is in fact the applicationId in the build.gradle file that should be used. The package name in the manifest and the applicationId is most of the time the same, but in my it was not. And I never got the app to properly authenticate. But now it does and I'm happy again!
The problem lies on this page and in this statement.
You need to specify your Android app's package name and SHA1 fingerprint.
- In the Package name field, enter your Android app's package name.
This is WRONG! It is in fact the applicationId in the build.gradle file that should be used. The package name in the manifest and the applicationId is most of the time the same, but in my it was not. And I never got the app to properly authenticate. But now it does and I'm happy again!
Etiketter:
android,
endpoints,
google,
google app engine
Thursday, June 30, 2016
Linux on Z83 mini PC
In my search for a replacement for my boxeebox that is closing in on its final days, the Z83 mini PC (sometime branded beelink) came up as a really cheap mini PC with great performance. Or maybe not so great, but for the price it is great. You get the point.
Anyway. It comes prepared with a windows 10 installation but I have no interest in using that. I intend to use a NFS share to deliver media to the box and that takes windows out of the game fairly quickly.
It turns out putting Ubuntu on this machine is tricky, possibly impossible. It has a 32-bit UEFI system and Ubuntu does not distribute 32-bit UEFI installers. In fact, the particular chipset configuration based on the Intel Atom X5 Cherry Trail has quite a few pages about linux if you start searching for info. It seems mainly destined for tablets, but this Mini PC is a good application as well I suppose.
The closest I got to completing the install was using these instructions. By building this Ubunty/Debian 32/64-bit hybrid Live USB the system would actually boot from it. And work quite well. However, the installation failed giving an error about how uefi-boot-32 failed to install (quite accurate for an error message for once).
I turned away from Ubuntu for the first time in many years. And turned to Debian. Debian which provided the uefi capability to let the Ubuntu image boot in the instructions above. I used the amd64/i386 netinst image. And it just works. I installed the MATE desktop environment. It is fast, and it just works. A bit ugly, but that's ok.
Now, my only problem is that the projected screen doesn't fit the TV screen which makes menus invisible. But I'll get to that. Oh, and the wireless network doesn't work either.
Anyway. It comes prepared with a windows 10 installation but I have no interest in using that. I intend to use a NFS share to deliver media to the box and that takes windows out of the game fairly quickly.
It turns out putting Ubuntu on this machine is tricky, possibly impossible. It has a 32-bit UEFI system and Ubuntu does not distribute 32-bit UEFI installers. In fact, the particular chipset configuration based on the Intel Atom X5 Cherry Trail has quite a few pages about linux if you start searching for info. It seems mainly destined for tablets, but this Mini PC is a good application as well I suppose.
The closest I got to completing the install was using these instructions. By building this Ubunty/Debian 32/64-bit hybrid Live USB the system would actually boot from it. And work quite well. However, the installation failed giving an error about how uefi-boot-32 failed to install (quite accurate for an error message for once).
I turned away from Ubuntu for the first time in many years. And turned to Debian. Debian which provided the uefi capability to let the Ubuntu image boot in the instructions above. I used the amd64/i386 netinst image. And it just works. I installed the MATE desktop environment. It is fast, and it just works. A bit ugly, but that's ok.
Now, my only problem is that the projected screen doesn't fit the TV screen which makes menus invisible. But I'll get to that. Oh, and the wireless network doesn't work either.
Monday, June 6, 2016
Android studio upgrade to 2.1 broke my project
I decided to try out the new (and still in beta) Android studio 2.1 today. Easy peasy as usuall, just download and unzip and run studio.sh and everything starts up.
I suspected that it would not be as easy thou. I spend a lot of time (hobbytime) with bugs and issues in Android studio, the SDK management and the emulator. No changes in the dev environment comes without pain. And sure enough, I got a question about updating the gradle build files which probably broke the project.
I started getting some weird compilation errors regarding the appcompat style definitions.
Google didn't help me much and I started trying to fix things. I spent maybe an hour trying to figure it out before I turned to source control. Which I should have done right away. Checking the git diff was all I needed. There, right before my eyes Android studio had simply washed away my project dependencies. This list was empty!
I took it all back. The only change I let Android studio have was the updated gradle version. That's it. And it was all that was needed. It works now, enough bleeding on the edge today.
I suspected that it would not be as easy thou. I spend a lot of time (hobbytime) with bugs and issues in Android studio, the SDK management and the emulator. No changes in the dev environment comes without pain. And sure enough, I got a question about updating the gradle build files which probably broke the project.
I started getting some weird compilation errors regarding the appcompat style definitions.
Error retrieving parent for item: No resource found that matches the given name "Theme.AppCompat.Light.NoActionBar".
Google didn't help me much and I started trying to fix things. I spent maybe an hour trying to figure it out before I turned to source control. Which I should have done right away. Checking the git diff was all I needed. There, right before my eyes Android studio had simply washed away my project dependencies. This list was empty!
I took it all back. The only change I let Android studio have was the updated gradle version. That's it. And it was all that was needed. It works now, enough bleeding on the edge today.
Friday, April 22, 2016
Unity broke again, how to fix it.
Updated to Ubuntu 16.04 today. I always update as soon as I can. OS updates, as well as regular updates, does however have a tendency to break Unity. I bit too often I think. When it happens, there are millions of articles online on how to debug and try to fix it. I've come to a simple solution that always fixes this constantly regressing piece of software.
Step 1: Always accept the default settings. This makes step 2 easier.
Step 2: When it breaks:
Now you can keep using your Ubuntu like nothing happened. This method saves half a day of googling a few times a year.
Step 1: Always accept the default settings. This makes step 2 easier.
Step 2: When it breaks:
sudo apt-get install unity-tweak-tool unity-tweak-tool --reset-unity
Now you can keep using your Ubuntu like nothing happened. This method saves half a day of googling a few times a year.
Update 2016-04-30:
Seems that Xenial might not have been ready for release just yet. Further updates has broken unity once again. But, as previously stated, --reset-unity will fix it.
Thursday, April 21, 2016
Bleeding on the edge, Android development with DELETE_FAILED_INTERNAL_ERROR
I've been spending some time in Android Studio learning to develop android apps the last few weeks. And it is so extremely frustrating to consider how much time the development environment is stealing from me!
- At home the emulator is really fast, but at work, with similar hardware and same OS it refuses to use acceleration.
- The projects "break" every now and then. The "app" module is lost and nothing can be done but recreating the project again.
- I forget to uncheck all those useless image updates when installing modules in the SDK. And have to wait for ever for them to download. Why are they checked by default every time?
And the last one. The one where the app refuses to install and you get the message
DEVICE SHELL COMMAND: pm uninstall your.package.nameGoogle has so many answers to this issue. Cleaning, restarting, reinstalling, deleting directories in Android and what not. Nobody seems to know why or what to do and yet it happens to me twice a week.
DELETE_FAILED_INTERNAL_ERROR
In the end there is only one solution that works, works fast and works every time. Go into the virtual device manager, click the drop down on your device and hit "Wipe Data"!
Stop spending time and try to fix this and just bite the bitter android until your lips start bleeding on the rough edges of the robot!
Monday, November 24, 2014
Broken VPN in Ubuntu 14.10 Utopic Unicorn
I spent a few hours today trying to figure out why my Open VPN connections refused to work. The only thing I got as a lead was a rather useless error message.
Google only pointed by to obscure old bug reports or the Arch Linux fix. But the Arch fix was of no use in Ubuntu. Until finally I stumbled upon a solution (which I have now lost track of). It's rather simple, but be careful!
Now reboot. Hopefully you'll come back online but without the widget when logging back in. Then, just reinstall the package.
As a precaution, you can download the package, just in case your network doesn't work without the user widget.
Failed to request VPN secrets #2: (6) No agents were available for this request.
Google only pointed by to obscure old bug reports or the Arch Linux fix. But the Arch fix was of no use in Ubuntu. Until finally I stumbled upon a solution (which I have now lost track of). It's rather simple, but be careful!
sudo apt-get remove --purge network-manager-gnome
Now reboot. Hopefully you'll come back online but without the widget when logging back in. Then, just reinstall the package.
sudo apt-get install network-manager-gnome
As a precaution, you can download the package, just in case your network doesn't work without the user widget.
Subscribe to:
Posts (Atom)