Notifications plugin does not seem loaded.

Hi, I have a trouble with the notification plugins. I have got this error on Corona-2020.3582 and Corona-2018.3326, could someone help me please?

I/Corona: ERROR: Runtime error
module ‘plugin.notifications.v2’ not found:resource (plugin.notifications.v2.lu) does not exist in archive
no field package.preload[‘plugin.notifications.v2’]
no file ‘(null)/plugin/notifications/v2.lua’
no file ‘(null)/plugin/notifications/v2.lua’
no file ‘/data/app/com.p2g.app-lg7bqSPa1BLwQEA6OFKZlQ==/lib/arm64/libplugin/notifications/v2.so’
no file ‘./plugin/notifications/v2.so’
no file ‘(null)/plugin/notifications/v2.so’
no file ‘/data/app/com.p2g.app-lg7bqSPa1BLwQEA6OFKZlQ==/lib/arm64/libplugin.so’
no file ‘./plugin.so’
no file ‘(null)/plugin.so’
no file ‘/data/app/com.p2g.app-lg7bqSPa1BLwQEA6OFKZlQ==/lib/arm64/libplugin.notifications.v2.so’
no file ‘./plugin.notifications.v2.so’
no file ‘(null)/plugin.notifications.v2.so’
no Java class ‘plugin.notifications.v2.LuaLoader’
no global loaded symbol ‘luaopen_plugin_notifications_v2’
no zipped .so symbol at ‘/data/app/com.p2g.app-lg7bqSPa1BLwQEA6OFKZlQ==/base.apk!/lib/arm64-v8a/libplugin.notifications.v2.so’
stack tracebac

First of all, I’d suggest switching to Solar2D builds if you are starting out new. There’s a possibility that you were not able to activate this plugin on the old Corona Marketplace. Here - https://github.com/coronalabs/corona/releases/

Second, you may want to post your build.settings so we can see how you included the plugin in the first place. Also, sharing how you did the require process in the code would help.

Thanks for your reply, yes I am very new to this but unfortunately has to come to handle this project but I am also tried the latest Solar2d daily build but still does not work, here is the build.settings.

settings =
{
    MinimumOSVersion="6.1",

    plugins = {
        ["plugin.notifications.v2"] = {
            publisherId = "com.coronalabs",
        },
    },
    
    orientation =
    {
        default = "portrait",
        supported = {"portrait"},
    },
    
    
    iphone =
    {
        plist =
        {
            CoronaDelegates = { "CoronaNotificationsDelegate", "CoronaFacebookDelegate" },
            CFBundleDisplayName = "park2go",
            CFBundleIconFiles = {
                "Icon.png",
                "Icon@2x.png",
                "Icon-Small-40.png",
                "Icon-Small-40@2x.png",
                "Icon-60.png",
                "Icon-167.png",
                "Icon-60@2x.png",
                "Icon-60@3x.png",
                "Icon-72.png",
                "Icon-72@2x.png",
                "Icon-76.png",
                "Icon-76@2x.png",
                "Icon-Small-50.png",
                "Icon-Small-50@2x.png",
                "Icon-Small.png",
                "Icon-Small@2x.png",
                "Icon-Small@3x.png"
            },
            NSLocationWhenInUseUsageDescription = "PARK2GO would like to access your current location",
            NSPhotoLibraryUsageDescription = "For user profile",
            NSCameraUsageDescription = "For scanning QR",
            NSAppTransportSecurity =
            {
                NSAllowsArbitraryLoads = true
            },  
            UIApplicationExitsOnSuspend = false,
            FacebookAppID = "872773936157768",
            CFBundleURLTypes =
            {
                { CFBundleURLSchemes = { "fb872773936157768", } }  
            },
            UIBackgroundModes = { "remote-notification" },
            FirebaseAppDelegateProxyEnabled = false,
        },

        types =
        {
            "badge",
            "sound",
            "alert"
        },
    },
    
    android =
    {
        versionName = "2.30",
        versionCode = 20,
        useGoogleServicesJson = true,
        permissions =
        {
            { name = ".permission.C2D_MESSAGE", protectionLevel = "signature" },
        },
        usesPermissions =
        {
            "android.permission.INTERNET",
            "android.permission.WRITE_EXTERNAL_STORAGE",
            "android.permission.ACCESS_FINE_LOCATION",
            "android.permission.GET_ACCOUNTS",
            "android.permission.RECEIVE_BOOT_COMPLETED",
            "com.google.android.c2dm.permission.RECEIVE",
            ".permission.C2D_MESSAGE",
            "android.permission.ACCESS_COARSE_LOCATION",
        },
        usesFeatures =
        {
            -- If you set permissions "ACCESS_FINE_LOCATION" and "ACCESS_COARSE_LOCATION" above,
            -- you may want to set up your app to not require location services as follows.
            -- Otherwise, devices that do not have location sevices (such as a GPS) will be unable
            -- to purchase this app in the app store.
            --            { name = "android.hardware.location", required = false },
            --            { name = "android.hardware.location.gps", required = false },
            --            { name = "android.hardware.location.network", required = false }
        },
    },  
}

And here is the code.

if not device.isSimulator then
    notifications = require( "plugin.notifications.v2" )
    if device.isApple then
        notifications.registerForPushNotifications()
    end
end

What OS are you using? If you can delete all of the previously downloaded plugins from the simulator and then start fresh by running the latest version of Solar2D that might help.

I’m sorry, funniest thing happened. I think I lost my Android test device :smiley: I couldn’t test it on device.

Anyway, I tried including just the plugin in a simple code and even though I was on simulator, nothing went wrong. You see this error on device, right?

I am using MacOS to compile and the error occurred in Android device.

Does it work in the simulator and on iOS?

I have not tried on iOS yet but simulator also not working. It is a Corona Native BTW.

I am having same issue, Also using Solar2D native.
did you find a solution?

I have the plugin folder plugin.notifications.v2_com.coronalabs here Project/android/app/build/corona-plugins
and this line fail to locate the plugin on android device!
local notifyPlugin = require “plugin.notifications.v2”