vertis.io
user

vertis.io

Writings about development, future technology and life


Featured

LitJSON causes System.MissingMethodException : No parameterless constructor defined for this object.

Posted on .

Filing another report under hard to google errors, which seems to be my primary reason for posting on this blog these days.

Was working with LitJSON in C# to deserialize an API response. When I started getting System.MissingMethodException : No parameterless constructor defined for this object..

This error message is too generic to Google, and there is nothing in the results related to LitJSON really. Turned out I had a really simple problem though.

My class was something like this

 
public class Foo {
  public string bar
}
 

When in reality to JSON was:

 
{
  "bar": {}
}
 

Calling:

var jsonObject = JsonMapper.ToObject<Foo>(res.body); 

Works much better when you’re not trying to shove a Map into a string.

Featured

Native module RNFirebaseModule tried to override RNFirebaseModule for module name RNFirebase

Posted on .

React Native has been a non-stop whirlwind of obscure error messages. For example:

Fatal Exception: java.lang.IllegalStateException: Native module RNFirebaseModule tried to override RNFirebaseModule for module name RNFirebase. If this was your intention, set canOverrideExistingModule=true
       at com.facebook.react.NativeModuleRegistryBuilder.addNativeModule(NativeModuleRegistryBuilder.java:121)
       at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:109)
       at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1050)
       at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1021)
       at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:959)
       at com.facebook.react.ReactInstanceManager.access$600(ReactInstanceManager.java:109)
       at com.facebook.react.ReactInstanceManager$4.run(ReactInstanceManager.java:802)
       at java.lang.Thread.run(Thread.java:818)

This one was caused by inadvertantly including the module twice in android/app/src/main/java/com/example/MainApplication.java.

I had included RNFirebasePackage() twice:

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new RNFirebasePackage(),
            new VectorIconsPackage(),
            new AndroidWifiPackage(),
            new RNFirebasePackage(),
            new RNFirebaseAuthPackage()
      );
    }

HT to the github issue that helped me work out the problem.

Featured

Things I wish 'Ok Google' would respond properly too

Posted on .

After switching to the Google Pixel, I’ve found myself using ‘Ok Google’ more and more. Particularly when it comes to doing things like setting reminders, and events and navigating.

This is a list of things I wished worked, in no particular order, with dates attached so I can record when they do start working.

Notes

  • Some of these things are limitations of the assistant, and some of them are limitations of the application
  • It possible some of these already work and I just don’t know how to access them. Though that is itself a failure. Discovery should be easy.

April 2017

  • Take a note - Says I don’t have a note app installed
  • Navigate to X (decides that I want to walk regardless of how far). “Navigate to X by car” works, but it should be more intelligent about what it suggests as the default.
  • Navigation: Toggle the toll roads / no toll roads per trip, rather than as a global setting in the navigation app. While ‘Navigate without tolls’ works
  • Send a Telegram message
  • Send a Whatsapp message
  • Set an all-day event (The flow can only handle ‘one hour’ meetings)
Featured

VR at Officeworks

Posted on .

Not the first VR headset I’ve found in a retailer here, KMart has had both an incredibly dodgy headset and also the somewhat cooler viewmaster, but it’s interesting to see Officeworks dedicating some space to VR headsets.

VR at Officeworks

They’ve previously done 3D printing though that didn’t end up sticking.

Featured

SXSW - VR for Architecture

Posted on .

Another great session at SXSW. InsiteVR and Interior Architects talking about how they’ve been using VR to increase understanding of upcoming work.

They’ve had experiences where people had incorrect perceptions of what a space was going to look and work like, that were corrected by seeing it in VR.