Monday, September 30, 2019

Android Chrome may not redirect to custom URI schemes automatically

Single Sign-On authentication for the Moodle mobile app works by opening the SSO page in a browser window and trusting the browser to redirect after the login to a custom URI scheme handled by the app. Interestingly, this works when the user was already logged into Moodle in their browser, but not after completing the SSO flow. Apparently the Chrome browser sometimes won't honor an HTTP Location redirect to a custom URI scheme. In Moodle's case, the confirmed=true query parameter can be added to make the page display some nice UI with a link to proceed to the app.

Sunday, September 29, 2019

Poking at the Markeen-assisted levels project

Many months ago, I started a Keen 5 level pack based on maps randomly generated by Markeen. It was coming along well but I left it alone for a long time because of other commitments. I had a couple moments of free time this week to look back at it. I had done my first pass of cleanup on the eighth map, but hadn't decided the flow of play through it. The constraints given to me by Markeen seem to require it to be an easier level than most others, but that's probably OK.

Wednesday, September 18, 2019

When Windows 10 upgrades to Enterprise instead of Pro

One user was trying to upgrade Windows 10 Home to Pro and so purchased a Pro upgrade in the Microsoft Store app. But after the installation, the Enterprise edition was installed and not activated because the user didn't have an Enterprise license. A clean reinstall of Windows 10 Home with another attempt at installing the Pro license from the Store produced Enterprise again. Apparently the way to downgrade to Pro is to use "change product key" to set the generic activation key for Pro. It will then notice the digital license and activate Pro properly.

Monday, September 16, 2019

CloudFront default objects are configured separately from S3 index documents

I recently helped someone set up a static site hosted on Amazon S3 with Amazon CloudFront as an SSL terminator. S3 buckets have an option for the index document (the page served when someone visits the root of the website). We set that, but found that going to the site's root produced an Access Denied error page, but going directly to a specific page worked. The CloudFront distribution apparently has a setting for default object which we had not set; CloudFront doesn't consult the S3 index document setting.

Saturday, September 14, 2019

Endless Gradle sync can indicate a missing Android SDK version

I previously noticed that if the Android SDK version requested by an Android Studio Gradle project isn't installed, Gradle sync may appear to succeed but everything will be broken. Today I found that another possible symptom is Gradle sync never finishing. A bunch of green check marks appear in the Build window, but a wheel still spins and Android Studio never proceeds to indexing. This can be fixed by installing the needed SDK version in the SDK Manager and pressing the Sync Project with Gradle Files button.

Wednesday, September 11, 2019

When using Git from IntelliJ or Android Studio fails with "illegal character <:>"

I recently helped some students who were trying to work with Git from Android Studio but received "illegal character" errors mentioning index 5 and the colon character. This turned out to be from a mistake in installing Git and trying to connect it to Android Studio. Where the IDE looks for Git is controlled by the "path to Git executable" setting on the Git page of the Version Control section of the settings. Pasting a Git repository URL there (in an attempt to clone it) causes this error. Instead the path box can be left blank to make Android Studio try to automatically find the Git installation.

Sunday, September 8, 2019

When Android Gradle sync fails with "could not get unknown property 'com'"

Today I helped a student who couldn't build any Android Studio projects because sync always failed with "could not get unknown property 'com'", with the stack trace not referring to the user's Gradle buildscripts. The normal strategy of invalidating Android Studio caches didn't help, nor even did reinstalling Android Studio! After a lot of poking around, we fixed the problem by removing the .gradle folder from the user's home directory. Apparently something in the shared Gradle cache was corrupt.

Wednesday, September 4, 2019

"Module not specified" may be caused by a missing Android SDK

Android SDK 29 came out pretty recently; one of my projects has not been updated to target it yet. But installing Android Studio now installs only version 29 of the SDK by default. Opening that project without the 28 SDK appears to work in that Gradle sync claims to complete successfully, but there is no "app" run configuration and test run configurations fail to start, saying "module not specified." Sure enough, the app directory isn't recognized as an IDEA module. Opening certain project files shows the "Gradle sync failed" bar, but trying sync again still claims to succeed. The only clue is a warning logged in the text version of the Gradle sync output that the license for SDK 28 hasn't been accepted.

Fixing this just requires installing the Android 28 SDK. That can be done in the Android Studio settings: Appearance & Behavior → System Settings → Android SDK.