Templater icon indicating copy to clipboard operation
Templater copied to clipboard

Error on Android 9: "TypeError: Object.fromEntries is not a function"

Open jacksteamdev opened this issue 2 years ago • 1 comments

Plugin information (please complete the following information):

  • OS: Android 9 in Google Chrome OS Version 99.0.4844.94 (32-bit)
  • Templater version: 1.12.0
  • Obsidian version: 1.1.1 (49)
  • Templater settings: can't access Templater settings

Describe the bug I'm running the Obsidian Android app on a Chromebook. This Chromebook uses Android 9.

When I try to enable Templater, it says it's enabled, but "Templater" doesn't show under the "Plugin Options" list, and Templater commands don't work. I can see Templater under "Settings -> Community Plugins", but the options button is missing.

I connected to Obsidian via ADB and saw the error "TypeError: Object.fromEntries is not a function" in the console. Upon inspection, Object.fromEntries is indeed undefined. It looks like this error keeps Templater from initializing.

Expected behavior Templater settings should be available in the plugins list and execute Templater commands.

Screenshots Error in ADB console image

Templater under Settings -> Community Plugins image

Templater is not under "Plugin Options" list image

Additional context Not sure why Object.fromEntries would be undefined, but adding a polyfill is an easy fix.

jacksteamdev avatar Apr 01 '22 21:04 jacksteamdev

I discovered that different Chromebooks use different versions of Android.

I have 2 Chromebooks; Templater works with one but not the other:

  • ✅ Intel i3 processor, Chrome OS 64-bit with Android 11. Obsidian and Templater work just fine.
  • ⚠️ ARM Octa-core processor, Chrome OS 32-bit with Android 9. Obsidian works, but Templater throws the error detailed above.

Object.fromEntries is ES2019 and Android 9 was released in 2018, so it makes sense that Object.fromEntries would be undefined.

jacksteamdev avatar Apr 05 '22 12:04 jacksteamdev

Unfortunately, won't be able to support this.

shabegom avatar Sep 01 '22 22:09 shabegom