Revmob on ios not working (Invalid Parameter: URL argument was malformed URL)

Update:

I just saw that when starting a session on the applicationResume event, I get the following log messages:

[RevMob] Testing mode off

[RevMob] Parallax effect disabled

These logs are produced by the following code:

 -- System event listener function local function onSystemEvent( event ) if ( event.type == "applicationResume" ) then -- Start a new RevMob session revmob.startSession() end end -- Add the system event listener Runtime:addEventListener( "system", onSystemEvent )

What is the Testing mode? What is the parallax effect?

Maybe this helps in finding the problem?

Best,

Felix

Thanks for the info Felix.

Just asking to be sure… you’re using a iOS specific media id when on iOS correct? 

Also, what version of iOS are you running on?

Hei Danny,

yes, I created a ios specific media id in the revmob panel. I verified this quite some times and also created new ones. No changes.

I am testing on an iPad mini running ios 9.3.2.

I will try on an iPhone later today. and I will also make an update to 9.3.3.

Best,

FElix

Hei Danny,

I tried it now on another device, I updated the OS to 9.3.3 and I even made a minimal app to see if it is something else in my code and I still get the same logs as in the beginning. Please see my complete app files below:

build.settings

-- -- For more information on build.settings see the Corona SDK Build Guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", }, }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, plugins = { ["plugin.revmob"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, }, -- -- iOS Section -- iphone = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-167.png", "Icon-60.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.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, }, }, -- -- Android Section -- android = { usesPermissions = { "android.permission.INTERNET", }, }, }

main.lua

----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- local revmob = require( "plugin.revmob" ) local text = display.newText("revmob test", 0,0, native.systemFont, 20) text.x = display.contentCenterX text.y = display.contentCenterY local function adListener( event ) print("ad phase: " .. event.phase) if ( event.phase == "init" ) then -- Successful initialization if event.isError then print( "isError: " .. event.isError ) elseif system.getInfo("platformName") == "Android" then print("loading ad ...") revmob.load( "rewardedVideo", "Rewarded Video" ) revmob.load( "interstitial", "Fullscreen" ) end elseif ( event.phase == "sessionStarted" ) then -- Successful initialization -- This only happens on iOS print("event phase: sessionStarted") revmob.load( "rewardedVideo", "Rewarded Video" ) revmob.load( "interstitial", "Fullscreen" ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) --this is done when the player clicks the continue button elseif event.phase == "sessionFailed" then --I think this only happens on iOS when there is no connection at startup... timer.performWithDelay(40000, function() if system.getInfo("platformName") == "Android" then revmob.init( adListener, { appId="576f1744ba....de3bf9924e" } ) --android else revmob.init( adListener, { appId="5770527b3....9430b4b5242" } ) --ios end end) elseif (event.phase == "displayed") then revmob.load( "interstitial", "Fullscreen" ) elseif (event.phase == "rewardedVideoCompleted") then print("rewarded video watched...") revmob.load( "rewardedVideo", "Rewarded Video" ) end end -- Initialize RevMob if system.getInfo("platformName") == "Android" then revmob.init( adListener, { appId="576f1744ba....de3bf9924e" } ) --android else revmob.init( adListener, { appId="5770527b3....9430b4b5242" } ) --ios end

Here the logs produced by this code:

Jul 18 08:34:40.879 ---------- Device Log Starts ---------- Jul 18 08:34:59.986 [Device] Platform: iPad / iPad2,5 / 9.3.3 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-124.1 / 2016.2913 / pt-BR | BR | pt\_BR | pt Jul 18 08:35:00.107 [Device] [RevMob] Starting RevMobAds Jul 18 08:35:00.489 [Device] ad phase: init Jul 18 08:35:01.474 [Device] ad phase: sessionStarted Jul 18 08:35:01.490 [Device] event phase: sessionStarted Jul 18 08:35:01.490 [Device] Invalid Parameter: URL argument was malformed URL [Device] [RevMob] Initializing Fullscreen. Jul 18 08:35:01.552 [Device] [RevMob] Initializing Fullscreen. Jul 18 08:35:01.638 [Device] [RevMob] Fail with error: unsupported URL Jul 18 08:35:01.655 [Device] ad phase: failed Jul 18 08:35:01.656 [Device] rewardedVideo [Device] true [Device] unsupported URL - Error Code -1002 Jul 18 08:35:01.835 [Device] [RevMob] Server response with (401) status code. Jul 18 08:35:01.858 [Device] ad phase: failed Jul 18 08:35:01.859 [Device] interstitial [Device] true [Device] The operation couldn’t be completed. (Server response with (401) status code. error -1.) - Error Code -1

I am lost, no more ideas what to test. Might it be related to the language or the country? I am in Brazil…

I can also send you my media ID, so you could test it from another region, if you think this might be the problem…

Best,

Felix

ps. I used version 2016.293 of the simulator to build the app, but the problem also occured when building with a way older version…

Hi Felix, did you solve your problem?

I’m thinking about the placementID value of your code. I used to use the ID provided by Revmob dashboard. There should be an ID for each of the Ad unit of an App. Press the “eye” icon under “actions” of the “Ad Unit” to check.

By the way, I have my problem applying the video ads of Revmob. It is for iOS only. Once the user click the Video Ad (when finished) and leave the App to Safari or AppStore, he can never load another ads when returned. 

Wilsonwansun,

thank you so much, I couldnt test it jet, but I am quite sure that this is the solution.

And I am kinda disappointed by the revmob guy, that responded me in the other thread (https://forums.coronalabs.com/topic/63813-revmob-media-id-app-id-placement-id-what/) where I asked this.

Now reading again, he told me exactly the same as you did, but I misinterpreted it the first time and it started working on Android…

Well, this is was a journey… hahaha. (I hope it ends here)

I will test this later and will update this and the other thread.

Thanks again for chipping in!

Best,
Felix

ps. I cant tell anything about your problem jet, will see if I can reproduce it, when the ads are up and running…

Wilsonwansun,

thank you so much! It really was the problem…

(I already was wondering how you could create different ads of the same type, when using the media ID that I was using…)

Now I only need to await some ads to appear (“No Ads available for this device/country at this moment.”)

Thanks again, to everybody that helped.

Best,

Felix