Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
CritterHP5's avatar
CritterHP5
Protege
3 years ago

ovr_IAP_LaunchCheckoutFlow Dialog Immediately Closes

When calling ovr_IAP_LaunchCheckoutFlow, a popup will appear showing three white dots and then immediately closes. No error messages and the purchase does not return as being cancelled. I can see in the android logcat an IAP API call that includes the SKU and I couldn't identify any IAP errors.

I used the 4.27 Launcher and Oculus build of UE4 and both have the same issue.

  • UE 4.27 (Launcher/Oculus Build)
  • AppLab
void UIAPSubsystem::AttemptPurchase(FString sku)
{
	const char* skuString = TCHAR_TO_ANSI(*sku);
	Oculus->AddRequestDelegate(ovr_IAP_LaunchCheckoutFlow(skuString),
		FOculusMessageOnCompleteDelegate::CreateLambda([=](ovrMessageHandle messageHandle, bool bIsError)
		{
			ovrMessageType type = ovr_Message_GetType(messageHandle);
			const char* ovrMessageTypeString = ovrMessageType_ToString(type);
			
			if(bIsError)
			{
				ovrErrorHandle errorHandle = ovr_Message_GetError(messageHandle);
				const char* errorMessage = ovr_Error_GetMessage(errorHandle);
				OnPurchaseAttemptComplete.Broadcast(
					true,
					FString(ovrMessageTypeString) + "\n" + FString(errorMessage),
					false);
				return;
			}

			bool bIsError2 = ovr_Message_IsError(messageHandle);
			if(bIsError2)
			{
				ovrErrorHandle errorHandle = ovr_Message_GetError(messageHandle);
				const char* errorMessage = ovr_Error_GetMessage(errorHandle);
				OnPurchaseAttemptComplete.Broadcast(
					true,
					FString(ovrMessageTypeString) + "\n" + FString(errorMessage),
					false);
				return;
			}

			const ovrPurchaseHandle purchaseHandle = ovr_Message_GetPurchase(messageHandle);
const bool bPurchaseCanceled = !purchaseHandle; if(bPurchaseCanceled) { OnPurchaseAttemptComplete.Broadcast( false, FString::Printf(TEXT("%s\nPurchase Canceled"), *FString(ovrMessageTypeString)), true); }
else
{
OnPurchaseAttemptComplete.Broadcast(false, FString(TEXT("success")), false);
}
}) ); }
// Replaced company title with COMPANY
// Replaced app title with APP
// Replaced sku name with SKUTITLE
// Replaced app id with 1234567891234567 06-05 14:57:43.459 2021 2021 D [SEO] NavigationRouter: systemUxRouteString = systemux://launch_iap
06-05 14:57:43.459 2021 2021 D [SEO] NavigationRouter: systemUXRoute = LAUNCH_IAP(systemux://launch_iap)
06-05 14:57:43.459 2021 2021 D [SEO] NavigationRouter: shouldLaunchAsOverlay
06-05 14:57:43.459 2021 2021 D [SEO] NavigationRouter: shouldLaunchAsOverlay == true
06-05 14:57:43.461 2183 2183 I [OAO] ShellOverlayService: onStartCommand(): Intent { act=com.oculus.vrshell.intent.action.LAUNCH cat=[android.intent.category.LAUNCHER] dat=systemux://launch_iap flg=0x10000010 pkg=com.oculus.vrshell cmp=com.oculus.vrshell/.ShellOverlayService (has extras) }
06-05 14:57:43.462 2183 2183 I [OAO] ShellOverlayServiceJNI: NativeWake
06-05 14:57:43.462 2183 2183 I [OAO] ShellOverlayMain: WakeVrThread
06-05 14:57:43.462 2183 2183 I [OAO] ShellOverlayMain: WakeVrThread - notifying vr thread
06-05 14:57:43.462 2183 2606 I [OAO] ShellOverlayApp: VrThread woke up
06-05 14:57:43.462 2183 2606 I [OAO] ShellOverlayApp: 0x720b9fc360 msg: broadcastIntent:
06-05 14:57:43.462 2183 2606 I [OAO] ShellOverlayApp: ProcessMessage_Broadcast: com.oculus.vrshell.intent.action.LAUNCH
06-05 14:57:43.462 2183 2606 I [OAO] ShellOverlayApp: Handling Pending Launch from Intent - target=systemux://launch_iap, launchingComponent=com.oculus.vrshell.intent.action.LAUNCH
06-05 14:57:43.463 2183 2606 I [OAO] PanelAppLaunchInfo: PanelAppLaunchInfo componentString:com.oculus.store/com.oculus.store.IAPService packageName:com.oculus.store serviceName:com.oculus.store.IAPService componentName:com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.463 2183 2606 I [OAO] HostPlatform: Retrieving component launch information for package (com.oculus.store) and service (com.oculus.store.IAPService)
06-05 14:57:43.468 2183 2606 I [OAO] PanelAppConfigurationUtil: Sending Android activity token to component com.oculus.store/com.oculus.store.IAPService:false
06-05 14:57:43.470 2183 2606 I [OAO] HostPlatform: Is valid panel service component for package (com.oculus.store) and servi
06-05 14:57:43.481 2183 2606 I [OAO] LaunchController: System UX, targetComponent = systemux://launch_iap, uri = /iap/1234567891234567/SKUTitle/?platform_request_id=29&component_name_flatten=com.COMPANY.APP%2Fcom.epicgames.ue4.GameActivity, returnComponent = com.COMPANY.APP
06-05 14:57:43.481 2183 2606 I [OAO] PanelAppLaunchInfo: PanelAppLaunchInfo componentString:com.oculus.store/com.oculus.store.IAPService packageName:com.oculus.store serviceName:com.oculus.store.IAPService componentName:com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.481 2183 2606 I [OAO] HostPlatform: Retrieving component launch information for package (com.oculus.store) and service (com.oculus.store.IAPService)
06-05 14:57:43.481 2183 2606 I [OAO] HostPlatform: Is valid panel service component for package (com.oculus.store) and service (com.oculus.store.IAPService) - true
06-05 14:57:43.481 2183 2606 I [OAO] LaunchController: Registering Pending Launch of type ShellApplication with com.oculus.store/com.oculus.store.IAPService, overwriting existing launch false, of type None.
06-05 14:57:43.482 2183 2606 I [OAO] LaunchController: Building launch checks for com.oculus.store, activity or service: com.oculus.store.IAPService, primary active package: (com.COMPANY.APP)
06-05 14:57:43.509 2183 2606 D [OAO] HostPlatformPackages: app.isMvanLaunchRestricted in HostPlatformPackages false
06-05 14:57:43.509 2183 2606 D [OAO] HostPlatformPackages: packageName (trying to launch): com.oculus.store
06-05 14:57:43.514 759 1098 E PreferencesService: com.oculus.vrshell, anchor_persistence_cloud_anchor_service_enabled: get denied due to wrong type, check app's method of call or key type definition
06-05 14:57:43.514 2183 2606 E PreferencesManager: Caught exception: PreferencesService getInteger with key: anchor_persistence_cloud_anchor_service_enabled
06-05 14:57:43.516 2183 2606 I [OAO] LaunchController: BuildPauseLaunchCheck: true, false, false
06-05 14:57:43.517 2183 2606 I [OAO] LaunchController: Finished building launch checks for com.oculus.store
06-05 14:57:43.517 2183 2606 I [OAO] LaunchController: LaunchController::Launch pending type ShellApplication, pending details com.oculus.store/com.oculus.store.IAPService, launch type ShellApplication, launch details com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.517 2183 2606 I [OAO] PanelAppLaunchInfo: PanelAppLaunchInfo componentString:com.oculus.store/com.oculus.store.IAPService packageName:com.oculus.store serviceName:com.oculus.store.IAPService componentName:com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.517 2183 2606 I [OAO] HostPlatform: Retrieving component launch information for package (com.oculus.store) and service (com.oculus.store.IAPService)
06-05 14:57:43.517 2183 2606 I [OAO] HostPlatform: Is valid panel service component for package (com.oculus.store) and service (com.oculus.store.IAPService) - true
06-05 14:57:43.517 2183 2606 I [OAO] DesktopPanelController: LaunchOrRestore( com.oculus.store/com.oculus.store.IAPService ) with launchAsNew=0, sourcePanelId=0, launchTarget=Default, targetMonitor=-1, launchingComponent=com.oculus.vrshell.intent.action.LAUNCH
06-05 14:57:43.517 2183 2606 I [OAO] DesktopPanelControllerHelper: Validating activation
06-05 14:57:43.517 2183 2606 I [OAO] DesktopPanelControllerHelper: Resolving launch target
06-05 14:57:43.517 2183 2606 I [OAO] PanelAppsManager: ActivatePanelApp for component com.oculus.store/com.oculus.store.IAPService. New instance requested: 0
06-05 14:57:43.517 2183 2606 I [OAO] PanelAppsManager: Found 0 existing instances
06-05 14:57:43.517 2183 2606 I [OAO] PanelAppsManager: launching new instance of com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.517 2183 2606 I [OAO] ShellFrameHelpers: CreatePanelApp( com.oculus.store/com.oculus.store.IAPService )
06-05 14:57:43.517 2183 2606 I [OAO] ShellFrameHelpers: Environment:
06-05 14:57:43.517 2183 2606 I [OAO] ShellFrameHelpers: uri = /iap/1234567891234567/SKUTitle/?platform_request_id=29&component_name_flatten=com.COMPANY.APP%2Fcom.epicgames.ue4.GameActivity
06-05 14:57:43.517 2183 2606 I [OAO] PanelAppHost: PanelAppHost constructor, panel 5 (com.oculus.store/com.oculus.store.IAPService)
06-05 14:57:43.518 2183 2606 I [OAO] PanelAppHost: Panel app 5 (com.oculus.store/com.oculus.store.IAPService) changing state from startup to foreground
06-05 14:57:43.518 2183 2606 I [OAO] TelemetryProvider: This is the app that is being launched com.oculus.store
06-05 14:57:43.518 2183 2606 I [OAO] TelemetryProvider: is_requested_by_immersive_app false
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var uri = /iap/1234567891234567/SKUTitle/?platform_request_id=29&component_name_flatten=com.COMPANY.APP%2Fcom.epicgames.ue4.GameActivity
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_analytics_session_id = 10b5baf4-1a5a-45e9-ab91-02eea55a7fd5
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_userid = 101169748460752
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_version_name = 53.0.0.137.132
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_version_code = 472990674
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_automation_enabled = false
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_view_id_debugging_enabled = false
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_pixel_density = 20
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_render_scale = 1.250000
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_ux_policy = {"panelBackgroundLayerOriginDepths":{"far":0.2,"mid":0.1,"near":0.015}}
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_panel_session_id = 10b5baf4-1a5a-45e9-ab91-02eea55a7fd5-5
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_valid_panel_session_ids = ["10b5baf4-1a5a-45e9-ab91-02eea55a7fd5-5"]
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_back_navigation_enabled = false
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_feature_sets = appmenu-v1,appmenu-v2,cooperativeState-v2,destinationUi-v2,dragDrop-v1,dragToDesktop-v1,layerClipping-v1,layerClipping-v2,layerOptions-v1,layerParent-v1,layerTranslate-v1,multiapp-v1,multiapp-v2,multiapp-v3,multitasking-v1,shellPanelAdaptability-v1,systemActionBackgroundPanels-v1,systemThemeSetting-v1,system-reauth-v1,system-ux-file-picker-v1,systemThemeSetting-v2,vrNotificationsBootLoad-v1,controlBar-v1,copresence-v1,copresenceVersion-v1,vrLibraryAppLock-v1,contextualModality-v1
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_launch_timestamp = 614543
06-05 14:57:43.525 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_host = minimal_overlay
06-05 14:57:43.526 2183 2606 I [OAO] PanelAppHost: Passing env var _oc_shell_panel_id = 5
06-05 14:57:43.526 2183 2606 I [OAO] PanelAppHost: Calling sendPanelLaunchIntent for panel app 5 (com.oculus.store/com.oculus.store.IAPService)
06-05 14:57:43.526 2183 2606 D [OAO] ShellApplication: sendApkPanelLaunchIntent: packageName=com.oculus.store, serviceClassName=com.oculus.store.IAPService
06-05 14:57:43.527 2183 2606 D [OAO] PanelAppConnection: getSystemProcessUidForCurrentUser: 'android' systemUid = 1000
06-05 14:57:43.527 2183 2606 D [OAO] ShellApplication: bindService Intent { cmp=com.oculus.store/.IAPService }
06-05 14:57:43.529 1102 1127 D CompatibilityChangeReporter: Compat change id reported: 135634846; UID 10051; state: DISABLED
06-05 14:57:43.529 1102 1127 D CompatibilityChangeReporter: Compat change id reported: 177438394; UID 10051; state: DISABLED
06-05 14:57:43.529 1102 1127 D CompatibilityChangeReporter: Compat change id reported: 135772972; UID 10051; state: DISABLED
06-05 14:57:43.529 1102 1127 D CompatibilityChangeReporter: Compat change id reported: 135754954; UID 10051; state: DISABLED
06-05 14:57:43.529 1102 1164 D CompatibilityChangeReporter: Compat change id reported: 143937733; UID 10051; state: DISABLED
06-05 14:57:43.529 2183 2606 D [OAO] ShellApplication: notify OS to set com.oculus.store/com.oculus.store.IAPService to FOREGROUND
06-05 14:57:43.535 2183 2606 I [OAO] PanelAppsManager: LastOpenedPanels: Inserting panel 5 to monitor -1
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelControllerHelper: Resolving panel apps for activation
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelControllerHelper: Resolved 1 panel apps for Launch activation
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: Checking whether desktop switch is necessary with current desktop Multi-app for activation of app com.oculus.store/com.oculus.store.IAPService
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: Checking whether we need to switch desktops for Launch activation
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: Initial cooperative state for app com.oculus.store/com.oculus.store.IAPService with uri /iap/1234567891234567/SKUTitle/?platform_request_id=29&component_name_flatten=com.COMPANY.APP%2Fcom.epicgames.ue4.GameActivity is immersive
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: Selecting desktop Exclusive for activation
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: CooperativeState transit from shell state cooperative to immersive
06-05 14:57:43.535 2183 2606 I [OAO] DesktopPanelController: Switching desktop from Multi-app to Exclusive now. Backgrounding previous desktop on next frame
06-05 14:57:43.535 2183 2606 I [OAO] VrShellDesktopBase: DesktopType transit from desktop Multi-app to Exclusive, under shell state immersive with shouldTransitionFocusedApp:0

 

5 Replies

Replies have been turned off for this discussion
  • team_wrg's avatar
    team_wrg
    Honored Guest

    Facing the same problem. Have you figured out a way yet for this?

     

  • The first DLC I created was free. I created a new DLC that costs 0.99 cents and the purchase dialog works and immediately closes the next time if you attempt to purchase it again. So, I guess it's just undocumented behavior that it automatically closes the dialog if it's free or if you already own it. I was expecting some sort of confirmation dialog. I think there is an API call you can make to revoke access so you can test purchasing it again, but I can't remember where.

    Another note was that I was using a sideloaded app, a test user, and the Verify Entitlement node was disconnected. And I didn't need to use an osig file if it was even working in the first place.