Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in android.intentFilters, pathAdvancedPattern is rejected by JSON schema #26116

Open
billinghamj opened this issue Apr 28, 2023 · 4 comments
Open
Labels
Android enhancement New feature or request needs review Issue is ready to be reviewed by a maintainer

Comments

@billinghamj
Copy link

Summary

pathAdvancedPattern is one of the fields allowed by Android for intent filters - https://developer.android.com/guide/topics/manifest/data-element#path - introduced in API 31

When it is used in the android.intentFilters config section, it mostly works fine - there's no typing errors, it is generated correctly, etc. But when running expo-cli doctor, it's rejected

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 19.9.0 - /opt/homebrew/bin/node
      Yarn: 3.5.0 - /opt/homebrew/bin/yarn
      npm: 9.6.3 - /opt/homebrew/bin/npm
    Managers:
      CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    IDEs:
      Xcode: 14.3/14E222b - /usr/bin/xcodebuild
    npmGlobalPackages:
      eas-cli: 3.10.2
      expo-cli: 6.3.7
    Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

Android 13, no specific device

Error output

Error: Problems validating fields in app.json. Learn more: https://docs.expo.dev/workflow/configuration/
 • Field: android/intentFilters/0/data - must be object.
 • Field: android/intentFilters/0/data/1 - should NOT have additional property 'pathAdvancedPattern'.
 • Field: android/intentFilters/0/data - must match a schema in anyOf.

Reproducible demo or steps to reproduce from a blank project

app.config.ts:

import { ConfigContext, ExpoConfig } from '@expo/config';

export default (context: ConfigContext): ExpoConfig => {
	return {
		...context.config,
		version: '1.0.0',
		android: {
			package: 'com.jamesbillingham.testapp',
			intentFilters: [
				{
					autoVerify: true,
					action: 'VIEW',
					category: ['BROWSABLE', 'DEFAULT'],
					data: {
						scheme: 'https',
						host: 'testapp.jamesbillingham.com',
						pathAdvancedPattern: '/[^.~_-].*',
					},
				},
			],
		},
		plugins: [
			['expo-build-properties', {
				android: {
					minSdkVersion: 31,
					compileSdkVersion: 33,
					targetSdkVersion: 33,
					buildToolsVersion: '33.0.1',
				},
			}],
		],
	};
};
@billinghamj billinghamj added the needs review Issue is ready to be reviewed by a maintainer label Apr 28, 2023
@billinghamj billinghamj changed the title pathAdvancedPattern rejected by JSON schema in android.intentFilters, pathAdvancedPattern is rejected by JSON schema Apr 28, 2023
@DenysMoro
Copy link

We need this as well
pathPattern doesn't work for us for some reason

{
    scheme: 'https',
    host: 'site.url.ag',
    pathPattern: '/link/to/.*/.*/page/.*',
}

And only this works

{
    scheme: 'https',
    host: 'site.url.ag',
    pathAdvancedPattern: '/link/to/[0-9]+/[0-9]+/page/[0-9]+',
}

@byCedric byCedric removed the needs review Issue is ready to be reviewed by a maintainer label Dec 25, 2023
@byCedric byCedric transferred this issue from expo/expo-cli Dec 25, 2023
@byCedric byCedric added Android enhancement New feature or request labels Dec 25, 2023
@expo-bot expo-bot added the incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues label Dec 25, 2023
@expo-bot

This comment was marked as off-topic.

@byCedric byCedric reopened this Dec 25, 2023
@byCedric byCedric added needs review Issue is ready to be reviewed by a maintainer and removed incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues labels Dec 25, 2023
Copy link
Contributor

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Mar 24, 2024
@DenysMoro
Copy link

No stale

@github-actions github-actions bot removed the stale label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android enhancement New feature or request needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants