-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Use this page for files, links, exports, and runtime integration created by the generator.
The generator does not search parent directories. Run it from the existing plugin directory containing:
PluginConfig.json
package.json
android/
android/settings.gradle # or settings.gradle.kts
If those files do not exist, create and build the plugin using the official Supernote guide before running this tool.
Read the final rollback or recovery lines first. The generator uses the package manager indicated by the plugin's lockfile.
If both package-lock.json and yarn.lock exist, rerun Add with an explicit
choice:
supernote-module add my-module --type native --package-manager npm --yesUse yarn instead when that is the plugin's intended manager. Do not delete
.supernote-module-transaction.json while recovery is pending.
Confirm the generator added and linked the local dependency:
node -p "require('./package.json').dependencies['my-module']"
node -p "require.resolve('my-module/package.json')"Expected dependency value:
file:./local_modules/my-module
If Add used --skip-install, run the existing plugin's npm or Yarn install
command, then validate the generated module again.
Import generated modules with the default export:
import MyModule from 'my-module';Native declarations are regenerated by the Android/KSP build after export changes. Run:
supernote-module validate my-module --build --verboseConfirm package.json points main/react-native to index.js and types to
index.d.ts.
Run verbose validation and fix the first generated file or link it reports:
supernote-module validate my-module --build --verboseCommon causes are a missing file: dependency in your plugin, a stale
node_modules link, a missing Native settings block, or a hand-edited generated
Gradle file. Update can recreate generated files without replacing your
implementation.
supernote-module doctor --type jniJNI/JSI generation expects CMake 3.22.1+ and NDK Clang support for C23 and
C++23 targeting aarch64-linux-android27. Doctor reports the exact missing
generator prerequisite or failed compiler probe.
Check generator-specific rules:
- import this module's generated
SupernoteExportannotation; - use a public instance method on a concrete public class;
- use only supported parameter and return types;
- provide a supported constructor;
- keep export names unique.
Then regenerate and compile-check:
supernote-module validate my-module --build --verboseThe marker must be immediately before a top-level definition in .cc, .cpp,
or .cxx. Use only supported by-value types, name every parameter, and keep
export names unique. C files may provide helpers but cannot export.
supernote-module validate my-jni-module --build --verboseThe build inventories sources and regenerates bindings before CMake compilation.
Do not add handwritten JNI symbols. Common causes are stale generated bindings, an unsupported function signature, or failed native registration.
Run validate --build --verbose, then inspect your plugin's logs for
the generated SupernoteNative<JavaScriptName> tag.
Run validate --build --verbose, then inspect your plugin's logs for
the generated SupernoteJsi<JavaScriptName> tag. Relevant generator failures
mention library lookup, host libjsi.so, nativeInstall, runtime-pointer, or
HostFunction installation.
dlopen ... Permission denied or avc: denied { execute } means the device or
PluginHost blocked the library; it is not an export-marker or generation
failure. The tested enforcing retail configuration blocks execution from the
extracted location.
Use Native/JNI or obtain PluginHost/firmware support for an executable library location. The generator cannot change linker namespaces or SELinux policy.
Update has no dry-run or file-by-file diff. Commit first, then inspect the
module's .supernote-module.json:
-
generated_filesmay be replaced; -
implementation_rootsare preserved by Update; - the generated README is replaceable;
- Remove deletes the complete package.
See Managing Modules.
Run the generator again so startup recovery can read
.supernote-module-transaction.json. Exit code 3 means manual recovery is
still required. Follow the one printed action and preserve the journal while
investigating.
Compare files updated by the generator in package.json, lockfiles, Android
settings, local_modules/, and node_modules/ with version control before
editing files manually.