Explore all Icon open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Icon

Font-Awesome

Release 6.0.0

ionicons

v6.0.1

react-native-vector-icons

9.1.0

heroicons

v1.0.6

twemoji

Twemoji 13.1.1 update

Popular Libraries in Icon

Font-Awesome

by FortAwesome doticonjavascriptdoticon

star image 68936 doticonNOASSERTION

The iconic SVG, font, and CSS toolkit

feather

by feathericons doticonjavascriptdoticon

star image 21430 doticonMIT

Simply beautiful open source icons

ionicons

by ionic-team doticontypescriptdoticon

star image 15856 doticonMIT

Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎

react-native-vector-icons

by oblador doticonjavascriptdoticon

star image 15543 doticonMIT

Customizable Icons for React Native with support for image source and full styling.

heroicons

by tailwindlabs doticonjavascriptdoticon

star image 14454 doticonMIT

A set of free MIT-licensed high-quality SVG icons for UI development.

twemoji

by twitter doticonhtmldoticon

star image 13976 doticonNOASSERTION

Emoji for everyone. https://twemoji.twitter.com/

simple-icons

by simple-icons doticonjavascriptdoticon

star image 13060 doticonCC0-1.0

SVG icons for popular brands

gitmoji

by carloscuesta doticonjavascriptdoticon

star image 11579 doticonMIT

An emoji guide for your commit messages. 😜

tabler-icons

by tabler doticonjavascriptdoticon

star image 11408 doticonMIT

A set of over 1700 free MIT-licensed high-quality SVG icons for you to use in your web projects.

Trending New libraries in Icon

heroicons

by tailwindlabs doticonjavascriptdoticon

star image 14454 doticonMIT

A set of free MIT-licensed high-quality SVG icons for UI development.

tabler-icons

by tabler doticonjavascriptdoticon

star image 11408 doticonMIT

A set of over 1700 free MIT-licensed high-quality SVG icons for you to use in your web projects.

IconPark

by bytedance doticontypescriptdoticon

star image 4450 doticonApache-2.0

🍎Transform an SVG icon into multiple themes, and generate React icons,Vue icons,svg icons

macOS_Big_Sur_icons_replacements

by elrumo doticoncssdoticon

star image 3663 doticonGPL-3.0

Replacement icons for popular apps in the style of macOS Big Sur

mono-icons

by mono-company doticonhtmldoticon

star image 909 doticonNOASSERTION

open_clip

by mlfoundations doticonpythondoticon

star image 809 doticonNOASSERTION

An open source implementation of CLIP.

emoji-picker-element

by nolanlawson doticonjavascriptdoticon

star image 804 doticonApache-2.0

A lightweight emoji picker for the modern web

phosphor-home

by phosphor-icons doticontypescriptdoticon

star image 793 doticonMIT

The homepage of Phosphor Icons, a flexible icon family for everyone

lucide

by lucide-icons doticontypescriptdoticon

star image 724 doticonISC

Simply beautiful open source icons, community-sourced

Top Authors in Icon

1

erikdubois

17 Libraries

star icon46

2

IonicaBizau

12 Libraries

star icon223

3

KDE

8 Libraries

star icon273

4

compute-io

7 Libraries

star icon29

5

jxnblk

7 Libraries

star icon1942

6

googlearchive

7 Libraries

star icon102

7

snwh

6 Libraries

star icon2548

8

Templarian

6 Libraries

star icon525

9

icons8

6 Libraries

star icon4790

10

sindresorhus

6 Libraries

star icon2498

1

17 Libraries

star icon46

2

12 Libraries

star icon223

3

8 Libraries

star icon273

4

7 Libraries

star icon29

5

7 Libraries

star icon1942

6

7 Libraries

star icon102

7

6 Libraries

star icon2548

8

6 Libraries

star icon525

9

6 Libraries

star icon4790

10

6 Libraries

star icon2498

Trending Kits in Icon

Here are some famous Vue Icons Libraries. Some of the Vue Icons Libraries' use cases include App Navigation, Dashboard Design, Data Visualization, UI/UX Design, and Iconography.


Vue icons libraries are collections of icons that can be used in Vue.js applications. These libraries typically include a variety of icons that can be used to represent various actions, elements, or concepts within an application. They can be used to enhance the user experience by providing visual cues that help guide the user through the application.


Let us have a look at these libraries in detail below.

feather

  • Designed to be modern, minimalistic, and lightweight.
  • Built with SVG, meaning they can be scaled up and down without losing any quality.
  • Icons are available in both SVG and web fonts, making them easy to use in a variety of projects.

ionicons

  • Created using vector graphics, meaning they scale well for responsive applications.
  • Accessible and WCAG 2.0 compliant, making them suitable for all types of web applications.
  • Designed for customization, allowing developers to change colors, sizes, and shapes of the icons.

flag-icons

  • ο»ΏOffers an extensive selection of flags from around the world in a variety of styles and sizes.
  • Includes alternative versions of some flags, such as a β€œdefaced” version of the flag of the United States.
  • Includes a selection of generic icons, such as arrows and checkmarks, that can be used as additional visual indicators.

octicons

  • Specifically designed for GitHub, giving them a unique style that fits perfectly with the GitHub user interface.
  • Optimized for performance, ensuring that they won't slow down your website or application.
  • Completely open-source, with the source code available on GitHub.

devicon

  • Specifically designed for use in web development.
  • Icons are vector-based, meaning they look great at any size and can be easily scaled.
  • Updated regularly with new icons, so developers can keep up with the latest technology trends.

weather-icons

  • Unified set of symbols and icons for conveying weather conditions and phenomena.
  • Designed to be responsive, so it can scale to fit any screen size or device.
  • Icons for both the current and forecasted conditions, providing a comprehensive picture of the weather at a glance.

open-iconic

  • Only open source Vue icons library that offers a full suite of accessibility features.
  • One of the few Vue icons libraries that has a fully-documented API.
  • Provides a lightweight, fast, and reliable icon library that can be integrated into any project.

linearicons

  • Offers a searchable library of icons for quick access.
  • Icons are designed to be intuitive and easy to use.
  • Compatible with a wide range of frameworks, including Vue.js.

Trending Discussions on Icon

Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner

The unauthenticated git protocol on port 9418 is no longer supported

android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

flutter_launcher_icons not working Unhandled exception: FormatException: Invalid number (at character 1)

Vue 3 passing array warning: Extraneous non-props attributes were passed to component but could not be automatically inherited

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify

Android Studio Bumblebee - device manager not opening

Why am I getting errors while adding launcher icon in flutter project?

How do I get mobile status for discord bot by directly modifying IDENTIFY packet?

uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set

QUESTION

Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner

Asked 2022-Apr-04 at 05:49

When I double click the same item or if I go to each composable screen very quickly i receive an error, How do I solve this problem? I tried changing few things but I just can't solve it and I can't find any resources to fix this problem.

Bottom Navigation implementation

1@Composable
2fun BottomNav(
3    navController: NavController,
4    bottomNavState: MutableState<Boolean>,
5) {
6
7    val navItems = listOf(
8        Screen.HomeScreen,
9        Screen.BookmarkScreen,
10        Screen.MyRecipesScreen,
11        Screen.FavouriteScreen
12    )
13
14    AnimatedVisibility(
15        visible = bottomNavState.value,
16        enter = slideInVertically(initialOffsetY = { it }),
17        exit = slideOutVertically(targetOffsetY = { it }),
18        content = {
19            BottomNavigation(
20                backgroundColor = Color.White,
21                elevation = 12.dp
22            ) {
23
24                val bottomNavBackStackEntry by navController.currentBackStackEntryAsState()
25                val currentDestination = bottomNavBackStackEntry?.destination
26
27                navItems.forEach { item ->
28
29                    BottomNavigationItem(
30                        icon = {
31                            Icon(painter = painterResource(id = item.icon), contentDescription = "")
32                        },
33                        label = {
34                            Text(text = item.title)
35                        },
36                        selected = currentDestination?.hierarchy?.any { it.route == item.route } == true,
37                        onClick = {
38
39                            navController.navigate(item.route) {
40
41
42                                popUpTo(navController.graph.findStartDestination().id) {
43                                    saveState = true
44                                }
45                                launchSingleTop = true
46                                restoreState = true
47
48
49                            }
50
51                        },
52                        selectedContentColor = Color.Black,
53                        unselectedContentColor = Color.LightGray,
54                        alwaysShowLabel = true,
55                    )
56
57                }
58
59            }
60        }
61    )
62
63}
64

Error Received

1@Composable
2fun BottomNav(
3    navController: NavController,
4    bottomNavState: MutableState<Boolean>,
5) {
6
7    val navItems = listOf(
8        Screen.HomeScreen,
9        Screen.BookmarkScreen,
10        Screen.MyRecipesScreen,
11        Screen.FavouriteScreen
12    )
13
14    AnimatedVisibility(
15        visible = bottomNavState.value,
16        enter = slideInVertically(initialOffsetY = { it }),
17        exit = slideOutVertically(targetOffsetY = { it }),
18        content = {
19            BottomNavigation(
20                backgroundColor = Color.White,
21                elevation = 12.dp
22            ) {
23
24                val bottomNavBackStackEntry by navController.currentBackStackEntryAsState()
25                val currentDestination = bottomNavBackStackEntry?.destination
26
27                navItems.forEach { item ->
28
29                    BottomNavigationItem(
30                        icon = {
31                            Icon(painter = painterResource(id = item.icon), contentDescription = "")
32                        },
33                        label = {
34                            Text(text = item.title)
35                        },
36                        selected = currentDestination?.hierarchy?.any { it.route == item.route } == true,
37                        onClick = {
38
39                            navController.navigate(item.route) {
40
41
42                                popUpTo(navController.graph.findStartDestination().id) {
43                                    saveState = true
44                                }
45                                launchSingleTop = true
46                                restoreState = true
47
48
49                            }
50
51                        },
52                        selectedContentColor = Color.Black,
53                        unselectedContentColor = Color.LightGray,
54                        alwaysShowLabel = true,
55                    )
56
57                }
58
59            }
60        }
61    )
62
63}
642022-03-05 11:50:10.183 8460-8460/com.im.cookgaloreapp E/AndroidRuntime: FATAL EXCEPTION: main
65    Process: com.im.cookgaloreapp, PID: 8460
66    java.lang.IllegalStateException: Already attached to lifecycleOwner
67        at androidx.lifecycle.SavedStateHandleController.attachToLifecycle(SavedStateHandleController.java:38)
68        at androidx.lifecycle.SavedStateHandleAttacher.onRecreated(SavedStateHandleSupport.kt:139)
69        at androidx.savedstate.Recreator.reflectiveNew(Recreator.java:90)
70        at androidx.savedstate.Recreator.onStateChanged(Recreator.java:62)
71        at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
72        at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:271)
73        at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:313)
74        at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:151)
75        at androidx.lifecycle.LifecycleRegistry.setCurrentState(LifecycleRegistry.java:121)
76        at androidx.navigation.NavBackStackEntry.updateState(NavBackStackEntry.kt:188)
77        at androidx.navigation.NavBackStackEntry.setMaxLifecycle(NavBackStackEntry.kt:154)
78        at androidx.navigation.NavController.updateBackStackLifecycle$navigation_runtime_release(NavController.kt:987)
79        at androidx.navigation.NavController.dispatchOnDestinationChanged(NavController.kt:892)
80        at androidx.navigation.NavController.navigate(NavController.kt:1726)
81        at androidx.navigation.NavController.navigate(NavController.kt:1658)
82        at androidx.navigation.NavController.navigate(NavController.kt:1980)
83        at androidx.navigation.NavController.navigate$default(NavController.kt:1975)
84        at androidx.navigation.NavController.navigate(NavController.kt:1961)
85        at com.im.cookgaloreapp.ui.components.BottomNavigationKt$BottomNav$3$1$1$2.invoke(BottomNavigation.kt:67)
86        at com.im.cookgaloreapp.ui.components.BottomNavigationKt$BottomNav$3$1$1$2.invoke(BottomNavigation.kt:57)
87        at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke-k-4lQ0M(Clickable.kt:153)
88        at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke(Clickable.kt:142)
89        at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1$1.invokeSuspend(TapGestureDetector.kt:223)
90        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
91        at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
92        at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
93        at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
94        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
95        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
96        at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
97        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:511)
98        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:406)
99        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:419)
100        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:310)
101        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
102        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
103        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
104        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
105        at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:179)
106        at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:98)
107        at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:80)
1082022-03-05 11:50:10.184 8460-8460/com.im.cookgaloreapp E/AndroidRuntime:     at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1205)
109        at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1155)
110        at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1095)
111        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
112        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
113        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
114        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
115        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
116        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
117        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
118        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
119        at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:488)
120        at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
121        at android.app.Activity.dispatchTouchEvent(Activity.java:4125)
122        at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:446)
123        at android.view.View.dispatchPointerEvent(View.java:14568)
124        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6016)
125        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5819)
126        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5310)
127        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
128        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
129        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5485)
130        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
131        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5542)
132        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
133        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
134        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
135        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
136        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
137        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8080)
138        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8031)
139        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7992)
140        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8203)
141        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:220)
142        at android.os.MessageQueue.nativePollOnce(Native Method)
143        at android.os.MessageQueue.next(MessageQueue.java:335)
144        at android.os.Looper.loop(Looper.java:183)
145        at android.app.ActivityThread.main(ActivityThread.java:7656)
146        at java.lang.reflect.Method.invoke(Native Method)
147        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
148        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
149

ANSWER

Answered 2022-Mar-06 at 09:39

I'm facing the same problem using the latest compose navigation dependency 2.5.0-alpha03.

I don't know why it's happening.

Philip Dukhov is right, you should report this issue.

Here is a dirty workaround :

1@Composable
2fun BottomNav(
3    navController: NavController,
4    bottomNavState: MutableState<Boolean>,
5) {
6
7    val navItems = listOf(
8        Screen.HomeScreen,
9        Screen.BookmarkScreen,
10        Screen.MyRecipesScreen,
11        Screen.FavouriteScreen
12    )
13
14    AnimatedVisibility(
15        visible = bottomNavState.value,
16        enter = slideInVertically(initialOffsetY = { it }),
17        exit = slideOutVertically(targetOffsetY = { it }),
18        content = {
19            BottomNavigation(
20                backgroundColor = Color.White,
21                elevation = 12.dp
22            ) {
23
24                val bottomNavBackStackEntry by navController.currentBackStackEntryAsState()
25                val currentDestination = bottomNavBackStackEntry?.destination
26
27                navItems.forEach { item ->
28
29                    BottomNavigationItem(
30                        icon = {
31                            Icon(painter = painterResource(id = item.icon), contentDescription = "")
32                        },
33                        label = {
34                            Text(text = item.title)
35                        },
36                        selected = currentDestination?.hierarchy?.any { it.route == item.route } == true,
37                        onClick = {
38
39                            navController.navigate(item.route) {
40
41
42                                popUpTo(navController.graph.findStartDestination().id) {
43                                    saveState = true
44                                }
45                                launchSingleTop = true
46                                restoreState = true
47
48
49                            }
50
51                        },
52                        selectedContentColor = Color.Black,
53                        unselectedContentColor = Color.LightGray,
54                        alwaysShowLabel = true,
55                    )
56
57                }
58
59            }
60        }
61    )
62
63}
642022-03-05 11:50:10.183 8460-8460/com.im.cookgaloreapp E/AndroidRuntime: FATAL EXCEPTION: main
65    Process: com.im.cookgaloreapp, PID: 8460
66    java.lang.IllegalStateException: Already attached to lifecycleOwner
67        at androidx.lifecycle.SavedStateHandleController.attachToLifecycle(SavedStateHandleController.java:38)
68        at androidx.lifecycle.SavedStateHandleAttacher.onRecreated(SavedStateHandleSupport.kt:139)
69        at androidx.savedstate.Recreator.reflectiveNew(Recreator.java:90)
70        at androidx.savedstate.Recreator.onStateChanged(Recreator.java:62)
71        at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
72        at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:271)
73        at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:313)
74        at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:151)
75        at androidx.lifecycle.LifecycleRegistry.setCurrentState(LifecycleRegistry.java:121)
76        at androidx.navigation.NavBackStackEntry.updateState(NavBackStackEntry.kt:188)
77        at androidx.navigation.NavBackStackEntry.setMaxLifecycle(NavBackStackEntry.kt:154)
78        at androidx.navigation.NavController.updateBackStackLifecycle$navigation_runtime_release(NavController.kt:987)
79        at androidx.navigation.NavController.dispatchOnDestinationChanged(NavController.kt:892)
80        at androidx.navigation.NavController.navigate(NavController.kt:1726)
81        at androidx.navigation.NavController.navigate(NavController.kt:1658)
82        at androidx.navigation.NavController.navigate(NavController.kt:1980)
83        at androidx.navigation.NavController.navigate$default(NavController.kt:1975)
84        at androidx.navigation.NavController.navigate(NavController.kt:1961)
85        at com.im.cookgaloreapp.ui.components.BottomNavigationKt$BottomNav$3$1$1$2.invoke(BottomNavigation.kt:67)
86        at com.im.cookgaloreapp.ui.components.BottomNavigationKt$BottomNav$3$1$1$2.invoke(BottomNavigation.kt:57)
87        at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke-k-4lQ0M(Clickable.kt:153)
88        at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke(Clickable.kt:142)
89        at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1$1.invokeSuspend(TapGestureDetector.kt:223)
90        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
91        at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
92        at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
93        at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
94        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
95        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
96        at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
97        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:511)
98        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:406)
99        at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:419)
100        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:310)
101        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
102        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
103        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
104        at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297)
105        at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:179)
106        at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:98)
107        at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:80)
1082022-03-05 11:50:10.184 8460-8460/com.im.cookgaloreapp E/AndroidRuntime:     at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1205)
109        at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1155)
110        at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1095)
111        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
112        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
113        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
114        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
115        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
116        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
117        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
118        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
119        at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:488)
120        at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
121        at android.app.Activity.dispatchTouchEvent(Activity.java:4125)
122        at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:446)
123        at android.view.View.dispatchPointerEvent(View.java:14568)
124        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6016)
125        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5819)
126        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5310)
127        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
128        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
129        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5485)
130        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
131        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5542)
132        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
133        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5367)
134        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5333)
135        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5341)
136        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5314)
137        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8080)
138        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8031)
139        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7992)
140        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8203)
141        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:220)
142        at android.os.MessageQueue.nativePollOnce(Native Method)
143        at android.os.MessageQueue.next(MessageQueue.java:335)
144        at android.os.Looper.loop(Looper.java:183)
145        at android.app.ActivityThread.main(ActivityThread.java:7656)
146        at java.lang.reflect.Method.invoke(Native Method)
147        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
148        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
149try {
150    // The navigation code that throw this exception
151} catch (e: IllegalStateException) {
152    if (e.message != "Already attached to lifecycleOwner") {
153        throw e
154    } else {
155        // You can log the exception if you want
156    }
157}
158

Source https://stackoverflow.com/questions/71361999

QUESTION

The unauthenticated git protocol on port 9418 is no longer supported

Asked 2022-Mar-27 at 13:23

I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7

Upon investigation, it appears that below section in my yml file is causing the issue.

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9

I have looked into this change log but can't seem to comprehend the issue.

Additional Details: Server: EC2 Instance Github actions steps:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55

package.json file

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234

ANSWER

Answered 2022-Mar-16 at 07:01

First, this error message is indeed expected on Jan. 11th, 2022.
See "Improving Git protocol security on GitHub".

January 11, 2022 Final brownout.

This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol.
This will help clients discover any lingering use of older keys or old URLs.

Second, check your package.json dependencies for any git:// URL, as in this example, fixed in this PR.

As noted by JΓΆrg W Mittag:

There was a 4-month warning.
The entire Internet has been moving away from unauthenticated, unencrypted protocols for a decade, it's not like this is a huge surprise.

Personally, I consider it less an "issue" and more "detecting unmaintained dependencies".

Plus, this is still only the brownout period, so the protocol will only be disabled for a short period of time, allowing developers to discover the problem.

The permanent shutdown is not until March 15th.


For GitHub Actions:

As in actions/checkout issue 14, you can add as a first step:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236

That will change any git://github.com/ into https://github.com/.

For local projects

For all your repositories, you can set:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237

You can also use SSH, but GitHub Security reminds us that, as of March 15th, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after Nov 2, 2021 will work only with SHA-2 signatures.
The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.

So this (with the right key) would work:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  "name": "stackstream-fe",
57  "version": "1.0.0",
58  "authors": [
59    "fayyaznofal@gmail.com"
60  ],
61  "private": true,
62  "dependencies": {
63    "@fortawesome/fontawesome-svg-core": "^1.2.34",
64    "@fortawesome/free-solid-svg-icons": "^5.15.2",
65    "@fortawesome/react-fontawesome": "^0.1.14",
66    "@fullcalendar/bootstrap": "^5.5.0",
67    "@fullcalendar/core": "^5.5.0",
68    "@fullcalendar/daygrid": "^5.5.0",
69    "@fullcalendar/interaction": "^5.5.0",
70    "@fullcalendar/react": "^5.5.0",
71    "@lourenci/react-kanban": "^2.1.0",
72    "@redux-saga/simple-saga-monitor": "^1.1.2",
73    "@testing-library/jest-dom": "^5.11.9",
74    "@testing-library/react": "^11.2.3",
75    "@testing-library/user-event": "^12.6.0",
76    "@toast-ui/react-chart": "^1.0.2",
77    "@types/jest": "^26.0.14",
78    "@types/node": "^14.10.3",
79    "@types/react": "^16.9.49",
80    "@types/react-dom": "^16.9.8",
81    "@vtaits/react-color-picker": "^0.1.1",
82    "apexcharts": "^3.23.1",
83    "availity-reactstrap-validation": "^2.7.0",
84    "axios": "^0.21.1",
85    "axios-mock-adapter": "^1.19.0",
86    "axios-progress-bar": "^1.2.0",
87    "bootstrap": "^5.0.0-beta2",
88    "chart.js": "^2.9.4",
89    "chartist": "^0.11.4",
90    "classnames": "^2.2.6",
91    "components": "^0.1.0",
92    "dotenv": "^8.2.0",
93    "draft-js": "^0.11.7",
94    "echarts": "^4.9.0",
95    "echarts-for-react": "^2.0.16",
96    "firebase": "^8.2.3",
97    "google-maps-react": "^2.0.6",
98    "history": "^4.10.1",
99    "i": "^0.3.6",
100    "i18next": "^19.8.4",
101    "i18next-browser-languagedetector": "^6.0.1",
102    "jsonwebtoken": "^8.5.1",
103    "leaflet": "^1.7.1",
104    "lodash": "^4.17.21",
105    "lodash.clonedeep": "^4.5.0",
106    "lodash.get": "^4.4.2",
107    "metismenujs": "^1.2.1",
108    "mkdirp": "^1.0.4",
109    "moment": "2.29.1",
110    "moment-timezone": "^0.5.32",
111    "nouislider-react": "^3.3.9",
112    "npm": "^7.6.3",
113    "prop-types": "^15.7.2",
114    "query-string": "^6.14.0",
115    "react": "^16.13.1",
116    "react-apexcharts": "^1.3.7",
117    "react-auth-code-input": "^1.0.0",
118    "react-avatar": "^3.10.0",
119    "react-bootstrap": "^1.5.0",
120    "react-bootstrap-editable": "^0.8.2",
121    "react-bootstrap-sweetalert": "^5.2.0",
122    "react-bootstrap-table-next": "^4.0.3",
123    "react-bootstrap-table2-editor": "^1.4.0",
124    "react-bootstrap-table2-paginator": "^2.1.2",
125    "react-bootstrap-table2-toolkit": "^2.1.3",
126    "react-chartist": "^0.14.3",
127    "react-chartjs-2": "^2.11.1",
128    "react-color": "^2.19.3",
129    "react-confirm-alert": "^2.7.0",
130    "react-content-loader": "^6.0.1",
131    "react-countdown": "^2.3.1",
132    "react-countup": "^4.3.3",
133    "react-cropper": "^2.1.4",
134    "react-data-table-component": "^6.11.8",
135    "react-date-picker": "^8.0.6",
136    "react-datepicker": "^3.4.1",
137    "react-dom": "^16.13.1",
138    "react-draft-wysiwyg": "^1.14.5",
139    "react-drag-listview": "^0.1.8",
140    "react-drawer": "^1.3.4",
141    "react-dropzone": "^11.2.4",
142    "react-dual-listbox": "^2.0.0",
143    "react-facebook-login": "^4.1.1",
144    "react-flatpickr": "^3.10.6",
145    "react-google-login": "^5.2.2",
146    "react-hook-form": "^7.15.2",
147    "react-i18next": "^11.8.5",
148    "react-icons": "^4.2.0",
149    "react-image-lightbox": "^5.1.1",
150    "react-input-mask": "^2.0.4",
151    "react-jvectormap": "^0.0.16",
152    "react-leaflet": "^3.0.5",
153    "react-meta-tags": "^1.0.1",
154    "react-modal-video": "^1.2.6",
155    "react-notifications": "^1.7.2",
156    "react-number-format": "^4.7.3",
157    "react-perfect-scrollbar": "^1.5.8",
158    "react-rangeslider": "^2.2.0",
159    "react-rating": "^2.0.5",
160    "react-rating-tooltip": "^1.1.6",
161    "react-redux": "^7.2.1",
162    "react-responsive-carousel": "^3.2.11",
163    "react-router-dom": "^5.2.0",
164    "react-script": "^2.0.5",
165    "react-scripts": "3.4.3",
166    "react-select": "^4.3.1",
167    "react-sparklines": "^1.7.0",
168    "react-star-ratings": "^2.3.0",
169    "react-super-responsive-table": "^5.2.0",
170    "react-switch": "^6.0.0",
171    "react-table": "^7.6.3",
172    "react-toastify": "^7.0.3",
173    "react-toastr": "^3.0.0",
174    "react-twitter-auth": "0.0.13",
175    "reactstrap": "^8.8.1",
176    "recharts": "^2.0.8",
177    "redux": "^4.0.5",
178    "redux-saga": "^1.1.3",
179    "reselect": "^4.0.0",
180    "sass": "^1.37.5",
181    "simplebar-react": "^2.3.0",
182    "styled": "^1.0.0",
183    "styled-components": "^5.2.1",
184    "toastr": "^2.1.4",
185    "typescript": "^4.0.2",
186    "universal-cookie": "^4.0.4"
187  },
188  "devDependencies": {
189    "@typescript-eslint/eslint-plugin": "^2.27.0",
190    "@typescript-eslint/parser": "^2.27.0",
191    "@typescript-eslint/typescript-estree": "^4.15.2",
192    "eslint-config-prettier": "^6.10.1",
193    "eslint-plugin-prettier": "^3.1.2",
194    "husky": "^4.2.5",
195    "lint-staged": "^10.1.3",
196    "prettier": "^1.19.1",
197    "react-test-renderer": "^16.13.1",
198    "redux-devtools-extension": "^2.13.8",
199    "redux-mock-store": "^1.5.4"
200  },
201  "scripts": {
202    "start": "react-scripts start",
203    "build": "react-scripts build && mv build ./deploy/build",
204    "build-local": "react-scripts build",
205    "test": "react-scripts test",
206    "eject": "react-scripts eject"
207  },
208  "eslintConfig": {
209    "extends": "react-app"
210  },
211  "husky": {
212    "hooks": {
213      "pre-commit": "lint-staged"
214    }
215  },
216  "lint-staged": {
217    "*.{js,ts,tsx}": [
218      "eslint --fix"
219    ]
220  },
221  "browserslist": {
222    "production": [
223      ">0.2%",
224      "not dead",
225      "not op_mini all"
226    ],
227    "development": [
228      "last 1 chrome version",
229      "last 1 firefox version",
230      "last 1 safari version"
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237git config --global url."git@github.com:".insteadOf git://github.com/
238

That will change any git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

Source https://stackoverflow.com/questions/70663523

QUESTION

android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

Asked 2022-Mar-24 at 15:30

I have added android:exported="true" to my only activity in manifest but still getting below error after updating compile sdk and target sdk version to 31.I also tried rebuilding the project , invalidating cache and restart but that didn't helped

Error- Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

AndroidManifest File
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3    package="com.xyz.abc">
4
5    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
6    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7
8    <application
9        android:name=".framework.presentation.BaseApplication"
10        android:allowBackup="true"
11        android:icon="@mipmap/ic_launcher"
12        android:label="@string/app_name"
13        android:roundIcon="@mipmap/ic_launcher_round"
14        android:supportsRtl="true"
15        android:theme="@style/AppTheme">
16        <activity android:name="com.xyz.presentation.MainActivity"
17            android:exported="true">
18            <intent-filter>
19                <action android:name="android.intent.action.MAIN" />
20
21                <category android:name="android.intent.category.LAUNCHER" />
22            </intent-filter>
23        </activity>
24    </application>
25
26</manifest>
27
Merged manifest error

Other Manifest Files (Included in merge, but did not contribute any elements) firebase-installations:17.0.0 manifest, versionedparcelable:1.1.1 manifest, runtime:1.0.1 manifest, test:core:1.2.0 manifest, loader:1.0.0 manifest, facebook-share:11.1.0 manifest, leakcanary:leaksentry:2.0-alpha-3 manifest, material-dialogs:input:3.2.1 manifest, material-icons-extended:1.0.0 manifest, play-services-stats:17.0.0 manifest, interpolator:1.0.0 manifest, activity-compose:1.3.1 manifest, material-ripple:1.0.0 manifest, foundation:1.0.0 manifest, asynclayoutinflater:1.0.0 manifest, savedstate-ktx:1.1.0 manifest, navigation-dynamic-features-fragment:2.3.5 manifest, firebase-ui-auth:7.2.0 manifest, animation:1.0.1 manifest, animation-core:1.0.1 manifest, installreferrer:1.0 manifest, firebase-crashlytics:18.0.0 manifest, ui:1.0.1 manifest, lifecycle-viewmodel-savedstate:2.3.1 manifest, play-services-auth-base:17.0.0 manifest, hilt-android:2.35.1 manifest, material-dialogs:core:3.2.1 manifest, AndroidManifest.xml navigation file, savedstate:1.1.0 manifest, cursoradapter:1.0.0 manifest, sqlite-framework:2.0.1 manifest, room-ktx:2.1.0 manifest, leakcanary-android-core:2.0-alpha-3 manifest, AndroidManifest.xml navigation file, media:1.0.0 manifest, coordinatorlayout:1.1.0 manifest, legacy-support-core-utils:1.0.0 manifest, lifecycle-runtime:2.3.1 manifest, coil-kt:coil:1.3.1 manifest, ui-tooling-preview:1.0.0 manifest, facebook-core:11.1.0 manifest, core:1.6.0 manifest, material:1.0.0 manifest, firebase-common:20.0.0 manifest, documentfile:1.0.0 manifest, lifecycle-viewmodel-compose:2.4.0-beta01 manifest, play-services-base:17.1.0 manifest, ui-tooling-data:1.0.0 manifest, coil-base:1.3.1 manifest, firebase-analytics-ktx:19.0.0 manifest, localbroadcastmanager:1.0.0 manifest, swiperefreshlayout:1.1.0-alpha03 manifest, constraintlayout-compose:1.0.0-beta02 manifest, core-ktx:1.6.0 manifest, firebase-database-collection:18.0.0 manifest, coil-compose-base:1.3.1 manifest, activity:1.3.1 manifest, AndroidManifest.xml navigation file, facebook-messenger:11.1.0 manifest, print:1.0.0 manifest, customview:1.1.0 manifest, material-icons-core:1.0.0 manifest, play-services-measurement-sdk:19.0.0 manifest, fragment:1.3.4 manifest, firebase-appcheck-interop:16.0.0-beta01 manifest, facebook-login:11.1.0 manifest, cardview:1.0.0 manifest, runtime-rxjava2:1.0.0 manifest, viewpager2:1.0.0 manifest, play-services-ads-identifier:17.0.0 manifest, play-services-measurement-impl:19.0.0 manifest, lifecycle-livedata-core:2.3.1 manifest, play-services-safetynet:17.0.0 manifest, AndroidManifest.xml navigation file, lifecycle-viewmodel-ktx:2.3.1 manifest, transport-backend-cct:3.0.0 manifest, fragment-ktx:1.2.4 manifest, appcompat:1.3.0 manifest, transport-runtime:3.0.0 manifest, lifecycle-livedata-core-ktx:2.2.0 manifest, firebase-firestore-ktx:23.0.0 manifest, legacy-support-v4:1.0.0 manifest, play-services-basement:17.1.1 manifest, firebase-storage:20.0.0 manifest, play-services-auth-api-phone:17.4.0 manifest, leakcanary-android:2.0-alpha-3 manifest, firebase-auth-interop:20.0.0 manifest, lifecycle-viewmodel:2.3.1 manifest, browser:1.0.0 manifest, firebase-auth:21.0.1 manifest, material:1.2.1 manifest, slidingpanelayout:1.0.0 manifest, vectordrawable:1.1.0 manifest, recyclerview:1.1.0 manifest, play-services-auth:19.0.0 manifest, room-runtime:2.1.0 manifest, dagger-lint-aar:2.35.1 manifest, navigation-dynamic-features-runtime:2.3.5 manifest, play-services-measurement-api:19.0.0 manifest, firebase-encoders-json:18.0.0 manifest, sqlite:2.0.1 manifest, facebook-android-sdk:11.1.0 manifest, firebase-components:17.0.0 manifest, transport-api:3.0.0 manifest, protolite-well-known-types:18.0.0 manifest, markdown-processor:0.1.3 manifest, play-services-measurement-base:19.0.0 manifest, firebase-common-ktx:20.0.0 manifest, activity-ktx:1.3.1 manifest, firebase-crashlytics-ktx:18.0.0 manifest, coil-compose:1.3.1 manifest, multidex:2.0.1 manifest, core-runtime:2.1.0 manifest, fragment-testing:1.2.0 manifest, ui-graphics:1.0.1 manifest, AndroidManifest.xml navigation file, ui-tooling:1.0.0 manifest, grpc-android:1.28.0 manifest, ui-unit:1.0.1 manifest, play-services-measurement:19.0.0 manifest, play:core:1.9.1 manifest, annotation-experimental:1.1.0 manifest, play-services-measurement-sdk-api:19.0.0 manifest, play-services-tasks:17.0.0 manifest, firebase-analytics:19.0.0 manifest, facebook-common:11.1.0 manifest, drawerlayout:1.1.1 manifest, AndroidManifest.xml navigation file, navigation-compose:2.4.0-alpha09 manifest, facebook-gamingservices:11.1.0 manifest, firebase-firestore:23.0.0 manifest, lifecycle-livedata:2.2.0 manifest, legacy-support-core-ui:1.0.0 manifest, test:monitor:1.2.0 manifest, AndroidManifest.xml navigation file, facebook-applinks:11.1.0 manifest, viewpager:1.0.0 manifest, ui-geometry:1.0.1 manifest, lifecycle-runtime-ktx:2.3.1 manifest, constraintlayout:2.0.4 manifest, ui-text:1.0.1 manifest, AndroidManifest.xml navigation file, firebase-installations-interop:17.0.0 manifest, transition:1.3.0 manifest, foundation-layout:1.0.1 manifest, appcompat-resources:1.3.1 manifest, runtime-livedata:1.0.0 manifest, runtime-saveable:1.0.1 manifest, firebase-measurement-connector:19.0.0 manifest, vectordrawable-animated:1.1.0 manifest, main nav_graph.xml navigation file Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. Dairy.app main manifest (this file) Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. Dairy.app main manifest (this file) Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. Dairy.app main manifest (this file)

ANSWER

Answered 2021-Oct-05 at 10:38

After the build has failed go to AndroidManifest.xml and in the bottom click merged manifest see which activities which have intent-filter but don't have exported=true attribute. Or you can just get the activities which are giving error.

Add these activities to your App manifest with android:exported="true" and app tools:node="merge" this will add exported attribute to the activities giving error.

Example:

1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3    package="com.xyz.abc">
4
5    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
6    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7
8    <application
9        android:name=".framework.presentation.BaseApplication"
10        android:allowBackup="true"
11        android:icon="@mipmap/ic_launcher"
12        android:label="@string/app_name"
13        android:roundIcon="@mipmap/ic_launcher_round"
14        android:supportsRtl="true"
15        android:theme="@style/AppTheme">
16        <activity android:name="com.xyz.presentation.MainActivity"
17            android:exported="true">
18            <intent-filter>
19                <action android:name="android.intent.action.MAIN" />
20
21                <category android:name="android.intent.category.LAUNCHER" />
22            </intent-filter>
23        </activity>
24    </application>
25
26</manifest>
27      <activity
28            android:name="<activity which is giving error>"
29            android:exported="true"
30            tools:node="merge" />
31

You will have to do this once, you can remove this once the library developers update their libs.

Source https://stackoverflow.com/questions/69287478

QUESTION

flutter_launcher_icons not working Unhandled exception: FormatException: Invalid number (at character 1)

Asked 2022-Mar-21 at 18:08

I want to change my app icon in flutter using flutter_launcher_icons: ^0.9.2
It shows me errors while I'm running Command flutter pub run flutter_launcher_icons:main
Image of the error


I tried many times but no new results

ANSWER

Answered 2022-Jan-04 at 17:38

I just had the same problem and solved doing this in android/app/build.gradle.

Changed:

1minSdkVersion flutter.minSdkVersion
2targetSdkVersion flutter.targetSdkVersion
3

To:

1minSdkVersion flutter.minSdkVersion
2targetSdkVersion flutter.targetSdkVersion
3minSdkVersion 26
4targetSdkVersion 30
5

Source

[Edit] After that, I could not run on emulator, so I changed back the gradle file (without running flutter_launcher_icon again). Now I have the app running and the icons are right.

Source https://stackoverflow.com/questions/70580684

QUESTION

Vue 3 passing array warning: Extraneous non-props attributes were passed to component but could not be automatically inherited

Asked 2022-Feb-26 at 21:48

please, I'm learning a VueJS 3 and I have probably begineer problem. I have warn in browser developer console like this one:

enter image description here

The Message is:

1[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
2

I'm passing array of objects to the child Component. In my parent views/Home.vue compoment I have this implemenation:

1[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
2<template>
3  <div class="wrapper">
4    <section v-for="(item, index) in items" :key="index" class="box">
5      <ItemProperties class="infobox-item-properties" :info="item.properties" />
6    </section>
7  </div>
8</template>
9<script>
10import { ref } from 'vue'
11import { data } from '@/data.js'
12import ItemProperties from '@/components/ItemProperties.vue'
13
14export default {
15  components: {
16    ItemDescription,
17  },
18  setup() {
19    const items = ref(data)
20
21    return {
22      items,
23    }
24  },
25</script>
26

In child compoment components/ItemProperties.vue I have this code:

1[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
2<template>
3  <div class="wrapper">
4    <section v-for="(item, index) in items" :key="index" class="box">
5      <ItemProperties class="infobox-item-properties" :info="item.properties" />
6    </section>
7  </div>
8</template>
9<script>
10import { ref } from 'vue'
11import { data } from '@/data.js'
12import ItemProperties from '@/components/ItemProperties.vue'
13
14export default {
15  components: {
16    ItemDescription,
17  },
18  setup() {
19    const items = ref(data)
20
21    return {
22      items,
23    }
24  },
25</script>
26<template>
27  <div class="infobox-item-property" v-for="(object, index) in info" :key="index">
28    <span class="infobox-item-title">{{ object.name }}:</span>
29    <span v-if="object.type === 'rating'">
30      <span v-for="(v, k) in object.value" :key="k">{{ object.icon }}</span>
31    </span>
32    <span v-else>
33      <span>{{ object.value }}</span>
34    </span>
35  </div>
36</template>
37
38<script>
39export default {
40  props: {
41    info: {
42      type: Array,
43      required: false,
44      default: () => [
45        {
46          name: '',
47          value: '',
48          type: 'string',
49          icon: '',
50        },
51      ],
52    },
53  },
54}
55</script>
56

It doesn't matter if I have default() function or not. Also doesn't matter if I have v-if condition or not. If I have cycle in the Array, I got this warning

Data are in data.js file. The part of file is here:

1[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
2<template>
3  <div class="wrapper">
4    <section v-for="(item, index) in items" :key="index" class="box">
5      <ItemProperties class="infobox-item-properties" :info="item.properties" />
6    </section>
7  </div>
8</template>
9<script>
10import { ref } from 'vue'
11import { data } from '@/data.js'
12import ItemProperties from '@/components/ItemProperties.vue'
13
14export default {
15  components: {
16    ItemDescription,
17  },
18  setup() {
19    const items = ref(data)
20
21    return {
22      items,
23    }
24  },
25</script>
26<template>
27  <div class="infobox-item-property" v-for="(object, index) in info" :key="index">
28    <span class="infobox-item-title">{{ object.name }}:</span>
29    <span v-if="object.type === 'rating'">
30      <span v-for="(v, k) in object.value" :key="k">{{ object.icon }}</span>
31    </span>
32    <span v-else>
33      <span>{{ object.value }}</span>
34    </span>
35  </div>
36</template>
37
38<script>
39export default {
40  props: {
41    info: {
42      type: Array,
43      required: false,
44      default: () => [
45        {
46          name: '',
47          value: '',
48          type: 'string',
49          icon: '',
50        },
51      ],
52    },
53  },
54}
55</script>
56export const data = [
57  {
58    title: 'White shirt',
59    properties: [
60      { name: 'Material', value: 'Cotton', type: 'string', icon: '' },
61      { name: 'Size', value: 'M', type: 'string', icon: '' },
62      { name: 'Count', value: 4, type: 'number', icon: '' },
63      { name: 'Absorption', value: 4, type: 'rating', icon: 'πŸ’§' },
64      { name: 'Rating', value: 2, type: 'rating', icon: '⭐️' },
65      { name: 'Confort', value: 2, type: 'rating', icon: 'πŸ›' },
66      { name: 'Sleeves', value: 'Short', type: 'string', icon: '' },
67      { name: 'Color', value: 'White', type: 'string', icon: '' },
68    ],
69  },
70]
71

PS: Application works but I'm afraid about that warning. What can I do please like right way?

I will be glad for any advice. Thank you very much.

ANSWER

Answered 2021-Aug-16 at 13:32

The ItemProperties component has multiple root nodes because it renders a list in the root with v-for.

Based on the class name (infobox-item-properties), I think you want the class to be applied to a container element, so a simple solution is to just add that element (e.g., a div) in your component at the root:

1[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
2<template>
3  <div class="wrapper">
4    <section v-for="(item, index) in items" :key="index" class="box">
5      <ItemProperties class="infobox-item-properties" :info="item.properties" />
6    </section>
7  </div>
8</template>
9<script>
10import { ref } from 'vue'
11import { data } from '@/data.js'
12import ItemProperties from '@/components/ItemProperties.vue'
13
14export default {
15  components: {
16    ItemDescription,
17  },
18  setup() {
19    const items = ref(data)
20
21    return {
22      items,
23    }
24  },
25</script>
26<template>
27  <div class="infobox-item-property" v-for="(object, index) in info" :key="index">
28    <span class="infobox-item-title">{{ object.name }}:</span>
29    <span v-if="object.type === 'rating'">
30      <span v-for="(v, k) in object.value" :key="k">{{ object.icon }}</span>
31    </span>
32    <span v-else>
33      <span>{{ object.value }}</span>
34    </span>
35  </div>
36</template>
37
38<script>
39export default {
40  props: {
41    info: {
42      type: Array,
43      required: false,
44      default: () => [
45        {
46          name: '',
47          value: '',
48          type: 'string',
49          icon: '',
50        },
51      ],
52    },
53  },
54}
55</script>
56export const data = [
57  {
58    title: 'White shirt',
59    properties: [
60      { name: 'Material', value: 'Cotton', type: 'string', icon: '' },
61      { name: 'Size', value: 'M', type: 'string', icon: '' },
62      { name: 'Count', value: 4, type: 'number', icon: '' },
63      { name: 'Absorption', value: 4, type: 'rating', icon: 'πŸ’§' },
64      { name: 'Rating', value: 2, type: 'rating', icon: '⭐️' },
65      { name: 'Confort', value: 2, type: 'rating', icon: 'πŸ›' },
66      { name: 'Sleeves', value: 'Short', type: 'string', icon: '' },
67      { name: 'Color', value: 'White', type: 'string', icon: '' },
68    ],
69  },
70]
71// ItemProperties.vue
72<template>
73  <div>
74    <section v-for="(item, index) in items" :key="index" class="box">
75    ...
76    </section>
77  </div>
78</template>
79

Source https://stackoverflow.com/questions/68803137

QUESTION

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify

Asked 2022-Feb-23 at 14:13

After upgrading to android 12, the application is not compiling. It shows

"Manifest merger failed with multiple errors, see logs"

Error showing in Merged manifest:

Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. main manifest (this file)

I have set all the activity with android:exported="false". But it is still showing this issue.

My manifest file:

1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3    xmlns:tools="http://schemas.android.com/tools"
4    package="eu.siacs.conversations">
5
6    <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10    <uses-permission android:name="android.permission.READ_CONTACTS" />
11    <uses-permission android:name="android.permission.READ_PROFILE" />
12    <uses-permission
13        android:name="android.permission.READ_PHONE_STATE"
14        android:maxSdkVersion="22" />
15    <uses-permission android:name="android.permission.INTERNET" />
16    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17    <uses-permission android:name="android.permission.WAKE_LOCK" />
18    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19    <uses-permission android:name="android.permission.VIBRATE" />
20    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27    <uses-feature
28        android:name="android.hardware.location"
29        android:required="false" />
30    <uses-feature
31        android:name="android.hardware.location.gps"
32        android:required="false" />
33    <uses-feature
34        android:name="android.hardware.location.network"
35        android:required="false" />
36
37    <uses-permission android:name="android.permission.CAMERA" />
38    <uses-permission android:name="android.permission.RECORD_AUDIO" />
39    <uses-permission android:name="android.permission.BLUETOOTH" />
40    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44    <uses-feature
45        android:name="android.hardware.camera"
46        android:required="false" />
47    <uses-feature
48        android:name="android.hardware.camera.autofocus"
49        android:required="false" />
50    <uses-feature
51        android:name="android.hardware.microphone"
52        android:required="false" />
53
54    <application
55        android:name=".Application"
56        android:allowBackup="false"
57        android:allowClearUserData="true"
58        android:appCategory="social"
59        android:hardwareAccelerated="true"
60        android:icon="@mipmap/ic_app_launch"
61        android:label="@string/app_name"
62        android:largeHeap="true"
63        android:networkSecurityConfig="@xml/network_security_configuration"
64        android:requestLegacyExternalStorage="true"
65        android:roundIcon="@mipmap/ic_app_launch_round"
66        android:theme="@style/ConversationsTheme"
67        android:usesCleartextTraffic="true"
68        android:windowSoftInputMode="adjustPan|adjustResize"
69        tools:replace="android:label"
70        tools:targetApi="q">
71        <activity
72            android:name=".ui.search.GroupSearchActivity"
73            android:exported="true" />
74        <activity
75            android:name=".ui.profileUpdating.FavouritesActivity"
76            android:exported="true" />
77        <activity
78            android:name=".ui.profileUpdating.NameActivity"
79            android:exported="true" />
80        <activity
81            android:name=".ui.CompulsoryUpdateActivity"
82            android:exported="true" />
83        <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84            android:exported="true" />
85        <activity android:name=".ui.individualList.IndividualListActivity"
86            android:exported="true" />
87        <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88            android:exported="true" />
89        <activity android:name=".ui.login.otpActivity.OTPActivity"
90            android:exported="true" />
91        <activity android:name=".ui.login.loginActivity.LoginActivity"
92            android:exported="true" />
93
94        <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96        <receiver android:name=".services.EventReceiver"
97            android:exported="true">
98            <intent-filter>
99                <action android:name="android.intent.action.BOOT_COMPLETED" />
100                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102                <action android:name="android.media.RINGER_MODE_CHANGED" />
103            </intent-filter>
104        </receiver>
105
106        <activity
107            android:name=".ui.ShareLocationActivity"
108            android:label="@string/title_activity_share_location"
109            android:exported="true"/>
110        <activity
111            android:name=".ui.SearchActivity"
112            android:label="@string/search_messages"
113            android:exported="true" />
114        <activity
115            android:name=".ui.RecordingActivity"
116            android:configChanges="orientation|screenSize"
117            android:theme="@style/ConversationsTheme.Dialog"
118            android:exported="true" />
119        <activity
120            android:name=".ui.ShowLocationActivity"
121            android:label="@string/title_activity_show_location"
122            android:exported="true" />
123        <activity
124            android:name=".ui.SplashActivity"
125            android:theme="@style/SplashTheme"
126            android:exported="true">
127            <intent-filter>
128                <action android:name="android.intent.action.MAIN" />
129
130                <category android:name="android.intent.category.LAUNCHER" />
131            </intent-filter>
132        </activity>
133        <activity
134            android:name=".ui.ConversationsActivity"
135            android:label="@string/app_name"
136            android:launchMode="singleTask"
137            android:minWidth="300dp"
138            android:minHeight="300dp"
139            android:exported="true"
140            android:windowSoftInputMode="stateHidden" />
141        <activity
142            android:name=".ui.ScanActivity"
143            android:screenOrientation="portrait"
144            android:exported="true"
145            android:theme="@style/ConversationsTheme.FullScreen"
146            android:windowSoftInputMode="stateAlwaysHidden" />
147        <activity
148            android:name=".ui.UriHandlerActivity"
149            android:label="@string/app_name"
150            android:exported="true">
151            <intent-filter>
152                <action android:name="android.intent.action.VIEW" />
153
154                <category android:name="android.intent.category.DEFAULT" />
155                <category android:name="android.intent.category.BROWSABLE" />
156
157                <data android:scheme="xmpp" />
158            </intent-filter>
159            <intent-filter android:autoVerify="true">
160                <action android:name="android.intent.action.VIEW" />
161
162                <category android:name="android.intent.category.DEFAULT" />
163                <category android:name="android.intent.category.BROWSABLE" />
164
165                <data android:scheme="https" />
166                <data android:host="im.app.in" />
167                <data android:pathPrefix="/i/" />
168                <data android:pathPrefix="/j/" />
169            </intent-filter>
170            <intent-filter>
171                <action android:name="android.intent.action.SENDTO" />
172
173                <category android:name="android.intent.category.DEFAULT" />
174
175                <data android:scheme="imto" />
176                <data android:host="jabber" />
177            </intent-filter>
178        </activity>
179        <activity
180            android:name=".ui.StartConversationActivity"
181            android:label="@string/title_activity_start_conversation"
182            android:launchMode="singleTop"
183            android:exported="true">
184            <intent-filter>
185                <action android:name="android.intent.action.VIEW" />
186            </intent-filter>
187        </activity>
188        <activity
189            android:name=".ui.SettingsActivity"
190            android:label="@string/title_activity_settings"
191            android:exported="true">
192            <intent-filter>
193                <action android:name="android.intent.action.MAIN" />
194
195                <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196            </intent-filter>
197        </activity>
198        <activity
199            android:name=".ui.ChooseContactActivity"
200            android:label="@string/title_activity_choose_contact"
201            android:exported="true" />
202        <activity
203            android:name=".ui.BlocklistActivity"
204            android:label="@string/title_activity_block_list"
205            android:exported="true"/>
206        <activity
207            android:name=".ui.ChangePasswordActivity"
208            android:label="@string/change_password_on_server"
209            android:exported="true"/>
210        <activity
211            android:name=".ui.ChooseAccountForProfilePictureActivity"
212            android:enabled="false"
213            android:label="@string/choose_account"
214            android:exported="true">
215            <intent-filter android:label="@string/set_profile_picture">
216                <action android:name="android.intent.action.ATTACH_DATA" />
217
218                <category android:name="android.intent.category.DEFAULT" />
219
220                <data android:mimeType="image/*" />
221            </intent-filter>
222        </activity>
223        <activity
224            android:name=".ui.ShareViaAccountActivity"
225            android:label="@string/title_activity_share_via_account"
226            android:launchMode="singleTop"
227            android:exported="true" />
228        <activity
229            android:name=".ui.EditAccountActivity"
230            android:launchMode="singleTop"
231            android:exported="true"
232            android:windowSoftInputMode="stateHidden|adjustResize" />
233        <activity
234            android:name=".ui.ConferenceDetailsActivity"
235            android:label="@string/action_muc_details"
236            android:exported="true"
237            android:windowSoftInputMode="stateHidden" />
238        <activity
239            android:name=".ui.ContactDetailsActivity"
240            android:exported="true"
241            android:windowSoftInputMode="stateHidden" />
242        <activity
243            android:name=".ui.PublishProfilePictureActivity"
244            android:label="@string/mgmt_account_publish_avatar"
245            android:exported="true"
246            android:windowSoftInputMode="stateHidden" />
247        <activity
248            android:name=".ui.PublishGroupChatProfilePictureActivity"
249            android:exported="true"
250            android:label="@string/group_chat_avatar" />
251        <activity
252            android:name=".ui.ShareWithActivity"
253            android:label="@string/app_name"
254            android:launchMode="singleTop"
255            android:exported="true">
256            <intent-filter>
257                <action android:name="android.intent.action.SEND" />
258                <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260                <category android:name="android.intent.category.DEFAULT" />
261
262                <data android:mimeType="text/plain" />
263            </intent-filter>
264            <intent-filter>
265                <action android:name="android.intent.action.SEND" />
266                <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268                <category android:name="android.intent.category.DEFAULT" />
269
270                <data android:mimeType="*/*" />
271            </intent-filter>
272
273            <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274            <meta-data
275                android:name="android.service.chooser.chooser_target_service"
276                android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277        </activity>
278        <activity
279            android:name=".ui.TrustKeysActivity"
280            android:label="@string/trust_omemo_fingerprints"
281            android:exported="true"
282            android:windowSoftInputMode="stateAlwaysHidden" />
283        <activity
284            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285            android:exported="true"
286            android:theme="@style/Base.Theme.AppCompat" />
287        <activity android:name=".ui.MemorizingActivity"
288            android:exported="true" />
289        <activity
290            android:name=".ui.MediaBrowserActivity"
291            android:exported="true"
292            android:label="@string/media_browser" />
293
294        <service android:name=".services.ExportBackupService" android:exported="true"/>
295        <service android:name=".services.ImportBackupService" android:exported="true"/>
296        <service
297            android:name=".services.ContactChooserTargetService"
298            android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299            android:exported="true">
300            <intent-filter>
301                <action android:name="android.service.chooser.ChooserTargetService" />
302            </intent-filter>
303        </service>
304        <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306        <provider
307            android:name="androidx.core.content.FileProvider"
308            android:authorities="${applicationId}.files"
309            android:exported="false"
310            android:grantUriPermissions="true">
311            <meta-data
312                android:name="android.support.FILE_PROVIDER_PATHS"
313                android:resource="@xml/file_paths" />
314        </provider>
315        <provider
316            android:name=".services.BarcodeProvider"
317            android:authorities="${applicationId}.barcodes"
318            android:exported="false"
319            android:grantUriPermissions="true" />
320
321        <activity
322            android:name=".ui.ShortcutActivity"
323            android:label="@string/contact"
324            android:exported="true">
325            <intent-filter>
326                <action android:name="android.intent.action.CREATE_SHORTCUT" />
327            </intent-filter>
328        </activity>
329        <activity
330            android:name=".ui.MucUsersActivity"
331            android:exported="true"
332            android:label="@string/group_chat_members" />
333        <activity
334            android:name=".ui.ChannelDiscoveryActivity"
335            android:exported="true"
336            android:label="@string/discover_channels" />
337        <activity
338            android:name=".ui.RtpSessionActivity"
339            android:autoRemoveFromRecents="true"
340            android:exported="true"
341            android:launchMode="singleInstance"
342            android:supportsPictureInPicture="true" />
343    </application>
344
345</manifest>
346

My second manifest file:

1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3    xmlns:tools="http://schemas.android.com/tools"
4    package="eu.siacs.conversations">
5
6    <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10    <uses-permission android:name="android.permission.READ_CONTACTS" />
11    <uses-permission android:name="android.permission.READ_PROFILE" />
12    <uses-permission
13        android:name="android.permission.READ_PHONE_STATE"
14        android:maxSdkVersion="22" />
15    <uses-permission android:name="android.permission.INTERNET" />
16    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17    <uses-permission android:name="android.permission.WAKE_LOCK" />
18    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19    <uses-permission android:name="android.permission.VIBRATE" />
20    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27    <uses-feature
28        android:name="android.hardware.location"
29        android:required="false" />
30    <uses-feature
31        android:name="android.hardware.location.gps"
32        android:required="false" />
33    <uses-feature
34        android:name="android.hardware.location.network"
35        android:required="false" />
36
37    <uses-permission android:name="android.permission.CAMERA" />
38    <uses-permission android:name="android.permission.RECORD_AUDIO" />
39    <uses-permission android:name="android.permission.BLUETOOTH" />
40    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44    <uses-feature
45        android:name="android.hardware.camera"
46        android:required="false" />
47    <uses-feature
48        android:name="android.hardware.camera.autofocus"
49        android:required="false" />
50    <uses-feature
51        android:name="android.hardware.microphone"
52        android:required="false" />
53
54    <application
55        android:name=".Application"
56        android:allowBackup="false"
57        android:allowClearUserData="true"
58        android:appCategory="social"
59        android:hardwareAccelerated="true"
60        android:icon="@mipmap/ic_app_launch"
61        android:label="@string/app_name"
62        android:largeHeap="true"
63        android:networkSecurityConfig="@xml/network_security_configuration"
64        android:requestLegacyExternalStorage="true"
65        android:roundIcon="@mipmap/ic_app_launch_round"
66        android:theme="@style/ConversationsTheme"
67        android:usesCleartextTraffic="true"
68        android:windowSoftInputMode="adjustPan|adjustResize"
69        tools:replace="android:label"
70        tools:targetApi="q">
71        <activity
72            android:name=".ui.search.GroupSearchActivity"
73            android:exported="true" />
74        <activity
75            android:name=".ui.profileUpdating.FavouritesActivity"
76            android:exported="true" />
77        <activity
78            android:name=".ui.profileUpdating.NameActivity"
79            android:exported="true" />
80        <activity
81            android:name=".ui.CompulsoryUpdateActivity"
82            android:exported="true" />
83        <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84            android:exported="true" />
85        <activity android:name=".ui.individualList.IndividualListActivity"
86            android:exported="true" />
87        <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88            android:exported="true" />
89        <activity android:name=".ui.login.otpActivity.OTPActivity"
90            android:exported="true" />
91        <activity android:name=".ui.login.loginActivity.LoginActivity"
92            android:exported="true" />
93
94        <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96        <receiver android:name=".services.EventReceiver"
97            android:exported="true">
98            <intent-filter>
99                <action android:name="android.intent.action.BOOT_COMPLETED" />
100                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102                <action android:name="android.media.RINGER_MODE_CHANGED" />
103            </intent-filter>
104        </receiver>
105
106        <activity
107            android:name=".ui.ShareLocationActivity"
108            android:label="@string/title_activity_share_location"
109            android:exported="true"/>
110        <activity
111            android:name=".ui.SearchActivity"
112            android:label="@string/search_messages"
113            android:exported="true" />
114        <activity
115            android:name=".ui.RecordingActivity"
116            android:configChanges="orientation|screenSize"
117            android:theme="@style/ConversationsTheme.Dialog"
118            android:exported="true" />
119        <activity
120            android:name=".ui.ShowLocationActivity"
121            android:label="@string/title_activity_show_location"
122            android:exported="true" />
123        <activity
124            android:name=".ui.SplashActivity"
125            android:theme="@style/SplashTheme"
126            android:exported="true">
127            <intent-filter>
128                <action android:name="android.intent.action.MAIN" />
129
130                <category android:name="android.intent.category.LAUNCHER" />
131            </intent-filter>
132        </activity>
133        <activity
134            android:name=".ui.ConversationsActivity"
135            android:label="@string/app_name"
136            android:launchMode="singleTask"
137            android:minWidth="300dp"
138            android:minHeight="300dp"
139            android:exported="true"
140            android:windowSoftInputMode="stateHidden" />
141        <activity
142            android:name=".ui.ScanActivity"
143            android:screenOrientation="portrait"
144            android:exported="true"
145            android:theme="@style/ConversationsTheme.FullScreen"
146            android:windowSoftInputMode="stateAlwaysHidden" />
147        <activity
148            android:name=".ui.UriHandlerActivity"
149            android:label="@string/app_name"
150            android:exported="true">
151            <intent-filter>
152                <action android:name="android.intent.action.VIEW" />
153
154                <category android:name="android.intent.category.DEFAULT" />
155                <category android:name="android.intent.category.BROWSABLE" />
156
157                <data android:scheme="xmpp" />
158            </intent-filter>
159            <intent-filter android:autoVerify="true">
160                <action android:name="android.intent.action.VIEW" />
161
162                <category android:name="android.intent.category.DEFAULT" />
163                <category android:name="android.intent.category.BROWSABLE" />
164
165                <data android:scheme="https" />
166                <data android:host="im.app.in" />
167                <data android:pathPrefix="/i/" />
168                <data android:pathPrefix="/j/" />
169            </intent-filter>
170            <intent-filter>
171                <action android:name="android.intent.action.SENDTO" />
172
173                <category android:name="android.intent.category.DEFAULT" />
174
175                <data android:scheme="imto" />
176                <data android:host="jabber" />
177            </intent-filter>
178        </activity>
179        <activity
180            android:name=".ui.StartConversationActivity"
181            android:label="@string/title_activity_start_conversation"
182            android:launchMode="singleTop"
183            android:exported="true">
184            <intent-filter>
185                <action android:name="android.intent.action.VIEW" />
186            </intent-filter>
187        </activity>
188        <activity
189            android:name=".ui.SettingsActivity"
190            android:label="@string/title_activity_settings"
191            android:exported="true">
192            <intent-filter>
193                <action android:name="android.intent.action.MAIN" />
194
195                <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196            </intent-filter>
197        </activity>
198        <activity
199            android:name=".ui.ChooseContactActivity"
200            android:label="@string/title_activity_choose_contact"
201            android:exported="true" />
202        <activity
203            android:name=".ui.BlocklistActivity"
204            android:label="@string/title_activity_block_list"
205            android:exported="true"/>
206        <activity
207            android:name=".ui.ChangePasswordActivity"
208            android:label="@string/change_password_on_server"
209            android:exported="true"/>
210        <activity
211            android:name=".ui.ChooseAccountForProfilePictureActivity"
212            android:enabled="false"
213            android:label="@string/choose_account"
214            android:exported="true">
215            <intent-filter android:label="@string/set_profile_picture">
216                <action android:name="android.intent.action.ATTACH_DATA" />
217
218                <category android:name="android.intent.category.DEFAULT" />
219
220                <data android:mimeType="image/*" />
221            </intent-filter>
222        </activity>
223        <activity
224            android:name=".ui.ShareViaAccountActivity"
225            android:label="@string/title_activity_share_via_account"
226            android:launchMode="singleTop"
227            android:exported="true" />
228        <activity
229            android:name=".ui.EditAccountActivity"
230            android:launchMode="singleTop"
231            android:exported="true"
232            android:windowSoftInputMode="stateHidden|adjustResize" />
233        <activity
234            android:name=".ui.ConferenceDetailsActivity"
235            android:label="@string/action_muc_details"
236            android:exported="true"
237            android:windowSoftInputMode="stateHidden" />
238        <activity
239            android:name=".ui.ContactDetailsActivity"
240            android:exported="true"
241            android:windowSoftInputMode="stateHidden" />
242        <activity
243            android:name=".ui.PublishProfilePictureActivity"
244            android:label="@string/mgmt_account_publish_avatar"
245            android:exported="true"
246            android:windowSoftInputMode="stateHidden" />
247        <activity
248            android:name=".ui.PublishGroupChatProfilePictureActivity"
249            android:exported="true"
250            android:label="@string/group_chat_avatar" />
251        <activity
252            android:name=".ui.ShareWithActivity"
253            android:label="@string/app_name"
254            android:launchMode="singleTop"
255            android:exported="true">
256            <intent-filter>
257                <action android:name="android.intent.action.SEND" />
258                <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260                <category android:name="android.intent.category.DEFAULT" />
261
262                <data android:mimeType="text/plain" />
263            </intent-filter>
264            <intent-filter>
265                <action android:name="android.intent.action.SEND" />
266                <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268                <category android:name="android.intent.category.DEFAULT" />
269
270                <data android:mimeType="*/*" />
271            </intent-filter>
272
273            <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274            <meta-data
275                android:name="android.service.chooser.chooser_target_service"
276                android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277        </activity>
278        <activity
279            android:name=".ui.TrustKeysActivity"
280            android:label="@string/trust_omemo_fingerprints"
281            android:exported="true"
282            android:windowSoftInputMode="stateAlwaysHidden" />
283        <activity
284            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285            android:exported="true"
286            android:theme="@style/Base.Theme.AppCompat" />
287        <activity android:name=".ui.MemorizingActivity"
288            android:exported="true" />
289        <activity
290            android:name=".ui.MediaBrowserActivity"
291            android:exported="true"
292            android:label="@string/media_browser" />
293
294        <service android:name=".services.ExportBackupService" android:exported="true"/>
295        <service android:name=".services.ImportBackupService" android:exported="true"/>
296        <service
297            android:name=".services.ContactChooserTargetService"
298            android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299            android:exported="true">
300            <intent-filter>
301                <action android:name="android.service.chooser.ChooserTargetService" />
302            </intent-filter>
303        </service>
304        <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306        <provider
307            android:name="androidx.core.content.FileProvider"
308            android:authorities="${applicationId}.files"
309            android:exported="false"
310            android:grantUriPermissions="true">
311            <meta-data
312                android:name="android.support.FILE_PROVIDER_PATHS"
313                android:resource="@xml/file_paths" />
314        </provider>
315        <provider
316            android:name=".services.BarcodeProvider"
317            android:authorities="${applicationId}.barcodes"
318            android:exported="false"
319            android:grantUriPermissions="true" />
320
321        <activity
322            android:name=".ui.ShortcutActivity"
323            android:label="@string/contact"
324            android:exported="true">
325            <intent-filter>
326                <action android:name="android.intent.action.CREATE_SHORTCUT" />
327            </intent-filter>
328        </activity>
329        <activity
330            android:name=".ui.MucUsersActivity"
331            android:exported="true"
332            android:label="@string/group_chat_members" />
333        <activity
334            android:name=".ui.ChannelDiscoveryActivity"
335            android:exported="true"
336            android:label="@string/discover_channels" />
337        <activity
338            android:name=".ui.RtpSessionActivity"
339            android:autoRemoveFromRecents="true"
340            android:exported="true"
341            android:launchMode="singleInstance"
342            android:supportsPictureInPicture="true" />
343    </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348    xmlns:tools="http://schemas.android.com/tools"
349    package="eu.siacs.conversations">
350
351    <application tools:ignore="GoogleAppIndexingWarning">
352        <activity
353            android:name=".ui.ManageAccountActivity"
354            android:label="@string/title_activity_manage_accounts"
355            android:launchMode="singleTask"
356            android:exported="true"/>
357        <activity
358            android:name=".ui.MagicCreateActivity"
359            android:label="@string/create_new_account"
360            android:launchMode="singleTask"
361            android:exported="true"/>
362        <activity
363            android:name=".ui.EasyOnboardingInviteActivity"
364            android:label="@string/invite_to_app"
365            android:launchMode="singleTask" />
366        <activity
367            android:name=".ui.ImportBackupActivity"
368            android:label="@string/restore_backup"
369            android:launchMode="singleTask"
370            android:exported="true">
371            <intent-filter>
372                <action android:name="android.intent.action.VIEW" />
373                <category android:name="android.intent.category.DEFAULT" />
374
375                <data android:mimeType="application/vnd.conversations.backup" />
376                <data android:scheme="content" />
377            </intent-filter>
378            <intent-filter>
379                <action android:name="android.intent.action.VIEW" />
380                <category android:name="android.intent.category.DEFAULT" />
381
382                <data android:mimeType="application/vnd.conversations.backup" />
383                <data android:scheme="file" />
384            </intent-filter>
385            <intent-filter>
386                <action android:name="android.intent.action.VIEW" />
387
388                <category android:name="android.intent.category.DEFAULT" />
389                <category android:name="android.intent.category.BROWSABLE" />
390
391                <data android:scheme="content" />
392                <data android:host="*" />
393                <data android:mimeType="*/*" />
394                <data android:pathPattern=".*\\.ceb" />
395                <data android:pathPattern=".*\\..*\\.ceb" />
396                <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397                <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401            </intent-filter>
402            <intent-filter>
403                <action android:name="android.intent.action.VIEW" />
404
405                <category android:name="android.intent.category.DEFAULT" />
406                <category android:name="android.intent.category.BROWSABLE" />
407
408                <data android:scheme="file" />
409                <data android:host="*" />
410                <data android:mimeType="*/*" />
411                <data android:pathPattern=".*\\.ceb" />
412                <data android:pathPattern=".*\\..*\\.ceb" />
413                <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414                <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418            </intent-filter>
419        </activity>
420    </application>
421</manifest>
422
423

My gradle file:

1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3    xmlns:tools="http://schemas.android.com/tools"
4    package="eu.siacs.conversations">
5
6    <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10    <uses-permission android:name="android.permission.READ_CONTACTS" />
11    <uses-permission android:name="android.permission.READ_PROFILE" />
12    <uses-permission
13        android:name="android.permission.READ_PHONE_STATE"
14        android:maxSdkVersion="22" />
15    <uses-permission android:name="android.permission.INTERNET" />
16    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17    <uses-permission android:name="android.permission.WAKE_LOCK" />
18    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19    <uses-permission android:name="android.permission.VIBRATE" />
20    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27    <uses-feature
28        android:name="android.hardware.location"
29        android:required="false" />
30    <uses-feature
31        android:name="android.hardware.location.gps"
32        android:required="false" />
33    <uses-feature
34        android:name="android.hardware.location.network"
35        android:required="false" />
36
37    <uses-permission android:name="android.permission.CAMERA" />
38    <uses-permission android:name="android.permission.RECORD_AUDIO" />
39    <uses-permission android:name="android.permission.BLUETOOTH" />
40    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44    <uses-feature
45        android:name="android.hardware.camera"
46        android:required="false" />
47    <uses-feature
48        android:name="android.hardware.camera.autofocus"
49        android:required="false" />
50    <uses-feature
51        android:name="android.hardware.microphone"
52        android:required="false" />
53
54    <application
55        android:name=".Application"
56        android:allowBackup="false"
57        android:allowClearUserData="true"
58        android:appCategory="social"
59        android:hardwareAccelerated="true"
60        android:icon="@mipmap/ic_app_launch"
61        android:label="@string/app_name"
62        android:largeHeap="true"
63        android:networkSecurityConfig="@xml/network_security_configuration"
64        android:requestLegacyExternalStorage="true"
65        android:roundIcon="@mipmap/ic_app_launch_round"
66        android:theme="@style/ConversationsTheme"
67        android:usesCleartextTraffic="true"
68        android:windowSoftInputMode="adjustPan|adjustResize"
69        tools:replace="android:label"
70        tools:targetApi="q">
71        <activity
72            android:name=".ui.search.GroupSearchActivity"
73            android:exported="true" />
74        <activity
75            android:name=".ui.profileUpdating.FavouritesActivity"
76            android:exported="true" />
77        <activity
78            android:name=".ui.profileUpdating.NameActivity"
79            android:exported="true" />
80        <activity
81            android:name=".ui.CompulsoryUpdateActivity"
82            android:exported="true" />
83        <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84            android:exported="true" />
85        <activity android:name=".ui.individualList.IndividualListActivity"
86            android:exported="true" />
87        <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88            android:exported="true" />
89        <activity android:name=".ui.login.otpActivity.OTPActivity"
90            android:exported="true" />
91        <activity android:name=".ui.login.loginActivity.LoginActivity"
92            android:exported="true" />
93
94        <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96        <receiver android:name=".services.EventReceiver"
97            android:exported="true">
98            <intent-filter>
99                <action android:name="android.intent.action.BOOT_COMPLETED" />
100                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102                <action android:name="android.media.RINGER_MODE_CHANGED" />
103            </intent-filter>
104        </receiver>
105
106        <activity
107            android:name=".ui.ShareLocationActivity"
108            android:label="@string/title_activity_share_location"
109            android:exported="true"/>
110        <activity
111            android:name=".ui.SearchActivity"
112            android:label="@string/search_messages"
113            android:exported="true" />
114        <activity
115            android:name=".ui.RecordingActivity"
116            android:configChanges="orientation|screenSize"
117            android:theme="@style/ConversationsTheme.Dialog"
118            android:exported="true" />
119        <activity
120            android:name=".ui.ShowLocationActivity"
121            android:label="@string/title_activity_show_location"
122            android:exported="true" />
123        <activity
124            android:name=".ui.SplashActivity"
125            android:theme="@style/SplashTheme"
126            android:exported="true">
127            <intent-filter>
128                <action android:name="android.intent.action.MAIN" />
129
130                <category android:name="android.intent.category.LAUNCHER" />
131            </intent-filter>
132        </activity>
133        <activity
134            android:name=".ui.ConversationsActivity"
135            android:label="@string/app_name"
136            android:launchMode="singleTask"
137            android:minWidth="300dp"
138            android:minHeight="300dp"
139            android:exported="true"
140            android:windowSoftInputMode="stateHidden" />
141        <activity
142            android:name=".ui.ScanActivity"
143            android:screenOrientation="portrait"
144            android:exported="true"
145            android:theme="@style/ConversationsTheme.FullScreen"
146            android:windowSoftInputMode="stateAlwaysHidden" />
147        <activity
148            android:name=".ui.UriHandlerActivity"
149            android:label="@string/app_name"
150            android:exported="true">
151            <intent-filter>
152                <action android:name="android.intent.action.VIEW" />
153
154                <category android:name="android.intent.category.DEFAULT" />
155                <category android:name="android.intent.category.BROWSABLE" />
156
157                <data android:scheme="xmpp" />
158            </intent-filter>
159            <intent-filter android:autoVerify="true">
160                <action android:name="android.intent.action.VIEW" />
161
162                <category android:name="android.intent.category.DEFAULT" />
163                <category android:name="android.intent.category.BROWSABLE" />
164
165                <data android:scheme="https" />
166                <data android:host="im.app.in" />
167                <data android:pathPrefix="/i/" />
168                <data android:pathPrefix="/j/" />
169            </intent-filter>
170            <intent-filter>
171                <action android:name="android.intent.action.SENDTO" />
172
173                <category android:name="android.intent.category.DEFAULT" />
174
175                <data android:scheme="imto" />
176                <data android:host="jabber" />
177            </intent-filter>
178        </activity>
179        <activity
180            android:name=".ui.StartConversationActivity"
181            android:label="@string/title_activity_start_conversation"
182            android:launchMode="singleTop"
183            android:exported="true">
184            <intent-filter>
185                <action android:name="android.intent.action.VIEW" />
186            </intent-filter>
187        </activity>
188        <activity
189            android:name=".ui.SettingsActivity"
190            android:label="@string/title_activity_settings"
191            android:exported="true">
192            <intent-filter>
193                <action android:name="android.intent.action.MAIN" />
194
195                <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196            </intent-filter>
197        </activity>
198        <activity
199            android:name=".ui.ChooseContactActivity"
200            android:label="@string/title_activity_choose_contact"
201            android:exported="true" />
202        <activity
203            android:name=".ui.BlocklistActivity"
204            android:label="@string/title_activity_block_list"
205            android:exported="true"/>
206        <activity
207            android:name=".ui.ChangePasswordActivity"
208            android:label="@string/change_password_on_server"
209            android:exported="true"/>
210        <activity
211            android:name=".ui.ChooseAccountForProfilePictureActivity"
212            android:enabled="false"
213            android:label="@string/choose_account"
214            android:exported="true">
215            <intent-filter android:label="@string/set_profile_picture">
216                <action android:name="android.intent.action.ATTACH_DATA" />
217
218                <category android:name="android.intent.category.DEFAULT" />
219
220                <data android:mimeType="image/*" />
221            </intent-filter>
222        </activity>
223        <activity
224            android:name=".ui.ShareViaAccountActivity"
225            android:label="@string/title_activity_share_via_account"
226            android:launchMode="singleTop"
227            android:exported="true" />
228        <activity
229            android:name=".ui.EditAccountActivity"
230            android:launchMode="singleTop"
231            android:exported="true"
232            android:windowSoftInputMode="stateHidden|adjustResize" />
233        <activity
234            android:name=".ui.ConferenceDetailsActivity"
235            android:label="@string/action_muc_details"
236            android:exported="true"
237            android:windowSoftInputMode="stateHidden" />
238        <activity
239            android:name=".ui.ContactDetailsActivity"
240            android:exported="true"
241            android:windowSoftInputMode="stateHidden" />
242        <activity
243            android:name=".ui.PublishProfilePictureActivity"
244            android:label="@string/mgmt_account_publish_avatar"
245            android:exported="true"
246            android:windowSoftInputMode="stateHidden" />
247        <activity
248            android:name=".ui.PublishGroupChatProfilePictureActivity"
249            android:exported="true"
250            android:label="@string/group_chat_avatar" />
251        <activity
252            android:name=".ui.ShareWithActivity"
253            android:label="@string/app_name"
254            android:launchMode="singleTop"
255            android:exported="true">
256            <intent-filter>
257                <action android:name="android.intent.action.SEND" />
258                <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260                <category android:name="android.intent.category.DEFAULT" />
261
262                <data android:mimeType="text/plain" />
263            </intent-filter>
264            <intent-filter>
265                <action android:name="android.intent.action.SEND" />
266                <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268                <category android:name="android.intent.category.DEFAULT" />
269
270                <data android:mimeType="*/*" />
271            </intent-filter>
272
273            <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274            <meta-data
275                android:name="android.service.chooser.chooser_target_service"
276                android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277        </activity>
278        <activity
279            android:name=".ui.TrustKeysActivity"
280            android:label="@string/trust_omemo_fingerprints"
281            android:exported="true"
282            android:windowSoftInputMode="stateAlwaysHidden" />
283        <activity
284            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285            android:exported="true"
286            android:theme="@style/Base.Theme.AppCompat" />
287        <activity android:name=".ui.MemorizingActivity"
288            android:exported="true" />
289        <activity
290            android:name=".ui.MediaBrowserActivity"
291            android:exported="true"
292            android:label="@string/media_browser" />
293
294        <service android:name=".services.ExportBackupService" android:exported="true"/>
295        <service android:name=".services.ImportBackupService" android:exported="true"/>
296        <service
297            android:name=".services.ContactChooserTargetService"
298            android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299            android:exported="true">
300            <intent-filter>
301                <action android:name="android.service.chooser.ChooserTargetService" />
302            </intent-filter>
303        </service>
304        <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306        <provider
307            android:name="androidx.core.content.FileProvider"
308            android:authorities="${applicationId}.files"
309            android:exported="false"
310            android:grantUriPermissions="true">
311            <meta-data
312                android:name="android.support.FILE_PROVIDER_PATHS"
313                android:resource="@xml/file_paths" />
314        </provider>
315        <provider
316            android:name=".services.BarcodeProvider"
317            android:authorities="${applicationId}.barcodes"
318            android:exported="false"
319            android:grantUriPermissions="true" />
320
321        <activity
322            android:name=".ui.ShortcutActivity"
323            android:label="@string/contact"
324            android:exported="true">
325            <intent-filter>
326                <action android:name="android.intent.action.CREATE_SHORTCUT" />
327            </intent-filter>
328        </activity>
329        <activity
330            android:name=".ui.MucUsersActivity"
331            android:exported="true"
332            android:label="@string/group_chat_members" />
333        <activity
334            android:name=".ui.ChannelDiscoveryActivity"
335            android:exported="true"
336            android:label="@string/discover_channels" />
337        <activity
338            android:name=".ui.RtpSessionActivity"
339            android:autoRemoveFromRecents="true"
340            android:exported="true"
341            android:launchMode="singleInstance"
342            android:supportsPictureInPicture="true" />
343    </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348    xmlns:tools="http://schemas.android.com/tools"
349    package="eu.siacs.conversations">
350
351    <application tools:ignore="GoogleAppIndexingWarning">
352        <activity
353            android:name=".ui.ManageAccountActivity"
354            android:label="@string/title_activity_manage_accounts"
355            android:launchMode="singleTask"
356            android:exported="true"/>
357        <activity
358            android:name=".ui.MagicCreateActivity"
359            android:label="@string/create_new_account"
360            android:launchMode="singleTask"
361            android:exported="true"/>
362        <activity
363            android:name=".ui.EasyOnboardingInviteActivity"
364            android:label="@string/invite_to_app"
365            android:launchMode="singleTask" />
366        <activity
367            android:name=".ui.ImportBackupActivity"
368            android:label="@string/restore_backup"
369            android:launchMode="singleTask"
370            android:exported="true">
371            <intent-filter>
372                <action android:name="android.intent.action.VIEW" />
373                <category android:name="android.intent.category.DEFAULT" />
374
375                <data android:mimeType="application/vnd.conversations.backup" />
376                <data android:scheme="content" />
377            </intent-filter>
378            <intent-filter>
379                <action android:name="android.intent.action.VIEW" />
380                <category android:name="android.intent.category.DEFAULT" />
381
382                <data android:mimeType="application/vnd.conversations.backup" />
383                <data android:scheme="file" />
384            </intent-filter>
385            <intent-filter>
386                <action android:name="android.intent.action.VIEW" />
387
388                <category android:name="android.intent.category.DEFAULT" />
389                <category android:name="android.intent.category.BROWSABLE" />
390
391                <data android:scheme="content" />
392                <data android:host="*" />
393                <data android:mimeType="*/*" />
394                <data android:pathPattern=".*\\.ceb" />
395                <data android:pathPattern=".*\\..*\\.ceb" />
396                <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397                <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401            </intent-filter>
402            <intent-filter>
403                <action android:name="android.intent.action.VIEW" />
404
405                <category android:name="android.intent.category.DEFAULT" />
406                <category android:name="android.intent.category.BROWSABLE" />
407
408                <data android:scheme="file" />
409                <data android:host="*" />
410                <data android:mimeType="*/*" />
411                <data android:pathPattern=".*\\.ceb" />
412                <data android:pathPattern=".*\\..*\\.ceb" />
413                <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414                <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418            </intent-filter>
419        </activity>
420    </application>
421</manifest>
422
423import com.android.build.OutputFile
424
425// Top-level build file where you can add configuration options common to all
426// sub-projects/modules.
427buildscript {
428    ext.kotlin_version = "1.5.21"
429    repositories {
430        google()
431        mavenCentral()
432        maven { url 'https://jitpack.io' }
433        gradlePluginPortal()
434    }
435    dependencies {
436        classpath 'com.android.tools.build:gradle:4.2.2'
437        classpath 'com.google.gms:google-services:4.3.8'
438        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
439    }
440}
441
442apply plugin: 'com.android.application'
443apply plugin: 'kotlin-android'
444apply plugin: 'kotlin-kapt'
445apply plugin: 'com.google.gms.google-services'
446
447repositories {
448    google()
449    mavenCentral()
450    jcenter()
451    maven { url 'https://jitpack.io' }
452}
453
454configurations {
455    conversationsFreeCompatImplementation
456}
457
458dependencies {
459    implementation 'androidx.viewpager:viewpager:1.0.0'
460    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
461
462    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
463
464    implementation 'org.sufficientlysecure:openpgp-api:10.0'
465    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
466    implementation 'androidx.appcompat:appcompat:1.3.1'
467    implementation 'androidx.exifinterface:exifinterface:1.3.2'
468    implementation 'androidx.cardview:cardview:1.0.0'
469    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
470    implementation 'androidx.emoji:emoji:1.1.0'
471    implementation 'com.google.android.material:material:1.4.0'
472    conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
473    implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
474    //zxing stopped supporting Java 7 so we have to stick with 3.3.3
475    //https://github.com/zxing/zxing/issues/1170
476    implementation 'com.google.zxing:core:3.4.1'
477    implementation 'de.measite.minidns:minidns-hla:0.2.4'
478    implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
479    implementation 'org.whispersystems:signal-protocol-java:2.8.1'
480    implementation 'com.makeramen:roundedimageview:2.3.0'
481    implementation "com.wefika:flowlayout:0.4.1"
482    implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
483    implementation 'org.jxmpp:jxmpp-jid:1.0.1'
484    implementation 'org.osmdroid:osmdroid-android:6.1.10'
485    implementation 'org.hsluv:hsluv:0.2'
486    implementation 'org.conscrypt:conscrypt-android:2.5.2'
487    implementation 'me.drakeet.support:toastcompat:1.1.0'
488    implementation "com.leinardi.android:speed-dial:3.2.0"
489
490    implementation "com.squareup.retrofit2:retrofit:2.9.0"
491    implementation "com.squareup.retrofit2:converter-gson:2.9.0"
492    implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
493    implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
494
495    implementation 'com.google.guava:guava:30.1.1-android'
496    implementation 'org.webrtc:google-webrtc:1.0.32006'
497
498    // Lifecycle Helper
499    implementation "androidx.activity:activity-ktx:1.3.0-rc02"
500    implementation "androidx.fragment:fragment-ktx:1.3.6"
501
502    //Navigation
503    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
504    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
505
506    //CardView
507    implementation "androidx.cardview:cardview:1.0.0"
508
509    //Country Code Picker
510    implementation 'com.hbb20:ccp:2.5.3'
511
512    //Firebase
513    implementation 'com.google.firebase:firebase-bom:28.3.0'
514    implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
515    implementation 'androidx.browser:browser:1.3.0'
516
517    //OTP view
518    implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
519
520    //Retrofit
521    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
522    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
523
524    //Gson
525    implementation 'com.google.code.gson:gson:2.8.7'
526
527    //Multidex
528    implementation 'androidx.multidex:multidex:2.0.1'
529
530    //Round Image
531    implementation 'de.hdodenhof:circleimageview:3.1.0'
532
533    // Button with image and text
534    implementation 'com.github.Omega-R:OmegaCenterIconButton:0.0.4@aar'
535
536    //Razor pay
537    implementation 'com.razorpay:checkout:1.6.10'
538
539    //Mixpanel Tracking
540    implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
541
542    //Loading screen
543    implementation 'com.wang.avi:library:2.1.3'
544
545    //Loading
546    implementation 'com.wang.avi:library:2.1.3'
547
548    //Form
549    implementation 'com.quickbirdstudios:surveykit:1.1.0'
550}
551
552ext {
553    travisBuild = System.getenv("TRAVIS") == "true"
554    preDexEnabled = System.getProperty("pre-dex", "true")
555    abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
556}
557
558android {
559    compileSdkVersion 31
560
561    defaultConfig {
562        minSdkVersion 24
563        targetSdkVersion 31
564        versionCode 44
565        versionName "2.0.4"
566        multiDexEnabled = true
567        archivesBaseName += "-$versionName"
568        applicationId "com.app.app"
569        resValue "string", "applicationId", applicationId
570        def appName = "app"
571        resValue "string", "app_name", appName
572        buildConfigField "String", "APP_NAME", "\"$appName\""
573    }
574
575    splits {
576        abi {
577            universalApk true
578            enable true
579        }
580    }
581
582    configurations {
583        compile.exclude group: 'org.jetbrains' , module:'annotations'
584    }
585
586    dataBinding {
587        enabled true
588    }
589
590    dexOptions {
591        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
592        preDexLibraries = preDexEnabled && !travisBuild
593        jumboMode true
594    }
595
596    compileOptions {
597        sourceCompatibility JavaVersion.VERSION_1_8
598        targetCompatibility JavaVersion.VERSION_1_8
599    }
600
601    flavorDimensions("mode", "distribution", "emoji")
602
603    productFlavors {
604
605        conversations {
606            dimension "mode"
607        }
608        free {
609            dimension "distribution"
610            versionNameSuffix "+f"
611        }
612        compat {
613            dimension "emoji"
614            versionNameSuffix "c"
615        }
616    }
617
618    sourceSets {
619        conversationsFreeCompat {
620            java {
621                srcDir 'src/freeCompat/java'
622                srcDir 'src/conversationsFree/java'
623            }
624        }
625    }
626
627    buildTypes {
628        release {
629            shrinkResources true
630            minifyEnabled true
631            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
632            versionNameSuffix "r"
633        }
634        debug {
635            shrinkResources true
636            minifyEnabled true
637            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
638            versionNameSuffix "d"
639        }
640    }
641
642
643    if (new File("signing.properties").exists()) {
644        Properties props = new Properties()
645        props.load(new FileInputStream(file("signing.properties")))
646
647        signingConfigs {
648            release {
649                storeFile file(props['keystore'])
650                storePassword props['keystore.password']
651                keyAlias props['keystore.alias']
652                keyPassword props['keystore.password']
653            }
654        }
655        buildTypes.release.signingConfig = signingConfigs.release
656    }
657
658    lintOptions {
659        disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
660    }
661
662    subprojects {
663
664        afterEvaluate {
665            if (getPlugins().hasPlugin('android') ||
666                    getPlugins().hasPlugin('android-library')) {
667
668                configure(android.lintOptions) {
669                    disable 'AndroidGradlePluginVersion', 'MissingTranslation'
670                }
671            }
672
673        }
674    }
675
676    packagingOptions {
677        exclude 'META-INF/BCKEY.DSA'
678        exclude 'META-INF/BCKEY.SF'
679    }
680
681    android.applicationVariants.all { variant ->
682        variant.outputs.each { output ->
683            def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
684            if (baseAbiVersionCode != null) {
685                output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
686            }
687        }
688
689    }
690}
691

ANSWER

Answered 2021-Aug-04 at 09:18

I'm not sure what you're using to code, but in order to set it in Android Studio, open the manifest of your project and under the "activity" section, put android:exported="true"(or false if that is what you prefer). I have attached an example.

Source https://stackoverflow.com/questions/68554294

QUESTION

Android Studio Bumblebee - device manager not opening

Asked 2022-Feb-16 at 23:00

I just updated Android Studio to: Android Studio Bumblebee | 2021.1.1 Build #AI-211.7628.21.2111.8092744, built on January 19, 2022

But now I cannot open the device manager anymore.

If I click on the icon, nothing happens.

enter image description here

ANSWER

Answered 2022-Feb-14 at 12:06

It seems that on Issue Tracker of Google other people have that issue about device manager after updating to bumblebee. Probably Google have to fix it with an update: https://issuetracker.google.com/issues?q=device%20manager

UPDATE:

I found a workaround: You should press shift 2 times to open search everything and type "Virtual Device Manager". This way you can open it

Source https://stackoverflow.com/questions/70855621

QUESTION

Why am I getting errors while adding launcher icon in flutter project?

Asked 2022-Feb-11 at 10:43

So, I am trying change the default flutter launcher icon with my one. I am using the flutter_launcher_icons: ^0.9.2 from pub.dev. The code in pubspec.yaml:

1dependencies:
2  flutter:
3    sdk: flutter
4
5
6  # The following adds the Cupertino Icons font to your application.
7  # Use with the CupertinoIcons class for iOS style icons.
8  cupertino_icons: ^1.0.2
9  hexcolor: ^2.0.5
10  google_fonts: ^2.1.0
11  flutter_neumorphic: ^3.2.0
12  flutter_launcher_icons: ^0.9.2
13
14dev_dependencies:
15  flutter_lints: ^1.0.4
16  flutter_test:
17    sdk: flutter
18
19flutter_icons:
20  image_path: "assets/icon/icon.png"
21  android: true
22  ios: true
23

But when I am running flutter pub run flutter_launcher_icons:main, I am getting error saying:

1dependencies:
2  flutter:
3    sdk: flutter
4
5
6  # The following adds the Cupertino Icons font to your application.
7  # Use with the CupertinoIcons class for iOS style icons.
8  cupertino_icons: ^1.0.2
9  hexcolor: ^2.0.5
10  google_fonts: ^2.1.0
11  flutter_neumorphic: ^3.2.0
12  flutter_launcher_icons: ^0.9.2
13
14dev_dependencies:
15  flutter_lints: ^1.0.4
16  flutter_test:
17    sdk: flutter
18
19flutter_icons:
20  image_path: "assets/icon/icon.png"
21  android: true
22  ios: true
23  ════════════════════════════════════════════
24     FLUTTER LAUNCHER ICONS (v0.9.1)
25  ════════════════════════════════════════════
26
27
28βœ“ Successfully generated launcher icons
29Unhandled exception:
30FormatException: Invalid number (at character 1)
31
32^
33
34#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
35#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
36#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
37#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
38#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)
39#5      main (file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.9.2/bin/main.dart:6:26)
40#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
41#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
42pub finished with exit code 255
43

And the Icon doesn't change.

What probably the problem?

=> I mean, coz it worked many times before...

ANSWER

Answered 2021-Dec-14 at 00:14

Go to android/app/build.gradle and change the minSdkVersion and targetSdkVersion to integer values.

1dependencies:
2  flutter:
3    sdk: flutter
4
5
6  # The following adds the Cupertino Icons font to your application.
7  # Use with the CupertinoIcons class for iOS style icons.
8  cupertino_icons: ^1.0.2
9  hexcolor: ^2.0.5
10  google_fonts: ^2.1.0
11  flutter_neumorphic: ^3.2.0
12  flutter_launcher_icons: ^0.9.2
13
14dev_dependencies:
15  flutter_lints: ^1.0.4
16  flutter_test:
17    sdk: flutter
18
19flutter_icons:
20  image_path: "assets/icon/icon.png"
21  android: true
22  ios: true
23  ════════════════════════════════════════════
24     FLUTTER LAUNCHER ICONS (v0.9.1)
25  ════════════════════════════════════════════
26
27
28βœ“ Successfully generated launcher icons
29Unhandled exception:
30FormatException: Invalid number (at character 1)
31
32^
33
34#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
35#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
36#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
37#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
38#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)
39#5      main (file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.9.2/bin/main.dart:6:26)
40#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
41#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
42pub finished with exit code 255
43minSdkVersion 21
44targetSdkVersion 29
45versionCode flutterVersionCode.toInteger()
46versionName flutterVersionName
47

Then do the rest, i.e.

1dependencies:
2  flutter:
3    sdk: flutter
4
5
6  # The following adds the Cupertino Icons font to your application.
7  # Use with the CupertinoIcons class for iOS style icons.
8  cupertino_icons: ^1.0.2
9  hexcolor: ^2.0.5
10  google_fonts: ^2.1.0
11  flutter_neumorphic: ^3.2.0
12  flutter_launcher_icons: ^0.9.2
13
14dev_dependencies:
15  flutter_lints: ^1.0.4
16  flutter_test:
17    sdk: flutter
18
19flutter_icons:
20  image_path: "assets/icon/icon.png"
21  android: true
22  ios: true
23  ════════════════════════════════════════════
24     FLUTTER LAUNCHER ICONS (v0.9.1)
25  ════════════════════════════════════════════
26
27
28βœ“ Successfully generated launcher icons
29Unhandled exception:
30FormatException: Invalid number (at character 1)
31
32^
33
34#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
35#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
36#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
37#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
38#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)
39#5      main (file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.9.2/bin/main.dart:6:26)
40#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
41#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
42pub finished with exit code 255
43minSdkVersion 21
44targetSdkVersion 29
45versionCode flutterVersionCode.toInteger()
46versionName flutterVersionName
47pub.get -> flutter pub run flutter_launcher_icons:main
48

Source https://stackoverflow.com/questions/70308823

QUESTION

How do I get mobile status for discord bot by directly modifying IDENTIFY packet?

Asked 2022-Feb-09 at 15:05

Apparently, discord bots can have mobile status as opposed to the desktop (online) status that one gets by default.

bot having mobile status

After a bit of digging I found out that such a status is achieved by modifying the IDENTIFY packet in discord.gateway.DiscordWebSocket.identify modifying the value of $browser to Discord Android or Discord iOS should theoretically get us the mobile status.

After modifying code snippets I found online which does this, I end up with this :

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32

Now all there is left to do is overwrite the discord.gateway.DiscordWebSocket.identify during runtime in the main file, something like this :

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45

And we do get the mobile status successfully
successful mobile status for bot

But here's the problem, I wanted to directly modify the file (which held the function) rather than monkey-patching it during runtime. So I cloned the dpy lib locally and edited the file on my machine, it ended up looking like this :

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45    async def identify(self):
46        """Sends the IDENTIFY packet."""
47        payload = {
48            'op': self.IDENTIFY,
49            'd': {
50                'token': self.token,
51                'properties': {
52                    '$os': sys.platform,
53                    '$browser': 'Discord Android',
54                    '$device': 'Discord Android',
55                    '$referrer': '',
56                    '$referring_domain': ''
57                },
58                'compress': True,
59                'large_threshold': 250,
60                'v': 3
61            }
62        }
63     # ...
64

(edited both $browser and $device to Discord Android just to be safe)

But this does not work and just gives me the regular desktop online icon.
So the next thing I did is to inspect the identify function after it has been monkey-patched, so I could just look at the source code and see what went wrong earlier, but due to hard luck I got this error :

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45    async def identify(self):
46        """Sends the IDENTIFY packet."""
47        payload = {
48            'op': self.IDENTIFY,
49            'd': {
50                'token': self.token,
51                'properties': {
52                    '$os': sys.platform,
53                    '$browser': 'Discord Android',
54                    '$device': 'Discord Android',
55                    '$referrer': '',
56                    '$referring_domain': ''
57                },
58                'compress': True,
59                'large_threshold': 250,
60                'v': 3
61            }
62        }
63     # ...
64Traceback (most recent call last):
65  File "c:\Users\Achxy\Desktop\fresh\file.py", line 8, in <module>
66    print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
67  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1024, in getsource
68    lines, lnum = getsourcelines(object)
69  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1006, in getsourcelines
70    lines, lnum = findsource(object)
71  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 835, in findsource
72    raise OSError('could not get source code')
73OSError: could not get source code
74

Code :

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45    async def identify(self):
46        """Sends the IDENTIFY packet."""
47        payload = {
48            'op': self.IDENTIFY,
49            'd': {
50                'token': self.token,
51                'properties': {
52                    '$os': sys.platform,
53                    '$browser': 'Discord Android',
54                    '$device': 'Discord Android',
55                    '$referrer': '',
56                    '$referring_domain': ''
57                },
58                'compress': True,
59                'large_threshold': 250,
60                'v': 3
61            }
62        }
63     # ...
64Traceback (most recent call last):
65  File "c:\Users\Achxy\Desktop\fresh\file.py", line 8, in <module>
66    print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
67  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1024, in getsource
68    lines, lnum = getsourcelines(object)
69  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1006, in getsourcelines
70    lines, lnum = findsource(object)
71  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 835, in findsource
72    raise OSError('could not get source code')
73OSError: could not get source code
74import discord
75import os
76from discord.ext import commands
77import mobile_status
78import inspect
79
80discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
81print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
82bot = commands.Bot(command_prefix="?")
83
84@bot.event
85async def on_ready():
86    print(f"Sucessfully logged in as {bot.user}")
87
88bot.run(os.getenv("DISCORD_TOKEN"))
89

Since this same behavior was exhibited for every patched function (aforementioned one and the loc["identify"]) I could no longer use inspect.getsource(...) and then relied upon dis.dis which lead to much more disappointing results

The disassembled data looks exactly identical to the monkey-patched working version, so the directly modified version simply does not work despite function content being the exact same. (In regards to disassembled data)

Notes: Doing Discord iOS directly does not work either, changing the $device to some other value but keeping $browser does not work, I have tried all combinations, none of them work.

TL;DR: How to get mobile status for discord bot without monkey-patching it during runtime?

ANSWER

Answered 2022-Feb-07 at 23:03

The following works by subclassing the relevant class, and duplicating code with the relevant changes. We also have to subclass the Client class, to overwrite the place where the gateway/websocket class is used. This results in a lot of duplicated code, however it does work, and requires neither dirty monkey-patching nor editing the library source code.

However, it does come with many of the same problems as editing the library source code - mainly that as the library is updated, this code will become out of date (if you're using the archived and obsolete version of the library, you have bigger problems instead).

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45    async def identify(self):
46        """Sends the IDENTIFY packet."""
47        payload = {
48            'op': self.IDENTIFY,
49            'd': {
50                'token': self.token,
51                'properties': {
52                    '$os': sys.platform,
53                    '$browser': 'Discord Android',
54                    '$device': 'Discord Android',
55                    '$referrer': '',
56                    '$referring_domain': ''
57                },
58                'compress': True,
59                'large_threshold': 250,
60                'v': 3
61            }
62        }
63     # ...
64Traceback (most recent call last):
65  File "c:\Users\Achxy\Desktop\fresh\file.py", line 8, in <module>
66    print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
67  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1024, in getsource
68    lines, lnum = getsourcelines(object)
69  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1006, in getsourcelines
70    lines, lnum = findsource(object)
71  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 835, in findsource
72    raise OSError('could not get source code')
73OSError: could not get source code
74import discord
75import os
76from discord.ext import commands
77import mobile_status
78import inspect
79
80discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
81print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
82bot = commands.Bot(command_prefix="?")
83
84@bot.event
85async def on_ready():
86    print(f"Sucessfully logged in as {bot.user}")
87
88bot.run(os.getenv("DISCORD_TOKEN"))
89import asyncio
90import sys
91
92import aiohttp
93
94import discord
95from discord.gateway import DiscordWebSocket, _log
96from discord.ext.commands import Bot
97
98
99class MyGateway(DiscordWebSocket):
100
101    async def identify(self):
102        payload = {
103            'op': self.IDENTIFY,
104            'd': {
105                'token': self.token,
106                'properties': {
107                    '$os': sys.platform,
108                    '$browser': 'Discord Android',
109                    '$device': 'Discord Android',
110                    '$referrer': '',
111                    '$referring_domain': ''
112                },
113                'compress': True,
114                'large_threshold': 250,
115                'v': 3
116            }
117        }
118
119        if self.shard_id is not None and self.shard_count is not None:
120            payload['d']['shard'] = [self.shard_id, self.shard_count]
121
122        state = self._connection
123        if state._activity is not None or state._status is not None:
124            payload['d']['presence'] = {
125                'status': state._status,
126                'game': state._activity,
127                'since': 0,
128                'afk': False
129            }
130
131        if state._intents is not None:
132            payload['d']['intents'] = state._intents.value
133
134        await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify)
135        await self.send_as_json(payload)
136        _log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id)
137
138
139class MyBot(Bot):
140
141    async def connect(self, *, reconnect: bool = True) -> None:
142        """|coro|
143
144        Creates a websocket connection and lets the websocket listen
145        to messages from Discord. This is a loop that runs the entire
146        event system and miscellaneous aspects of the library. Control
147        is not resumed until the WebSocket connection is terminated.
148
149        Parameters
150        -----------
151        reconnect: :class:`bool`
152            If we should attempt reconnecting, either due to internet
153            failure or a specific failure on Discord's part. Certain
154            disconnects that lead to bad state will not be handled (such as
155            invalid sharding payloads or bad tokens).
156
157        Raises
158        -------
159        :exc:`.GatewayNotFound`
160            If the gateway to connect to Discord is not found. Usually if this
161            is thrown then there is a Discord API outage.
162        :exc:`.ConnectionClosed`
163            The websocket connection has been terminated.
164        """
165
166        backoff = discord.client.ExponentialBackoff()
167        ws_params = {
168            'initial': True,
169            'shard_id': self.shard_id,
170        }
171        while not self.is_closed():
172            try:
173                coro = MyGateway.from_client(self, **ws_params)
174                self.ws = await asyncio.wait_for(coro, timeout=60.0)
175                ws_params['initial'] = False
176                while True:
177                    await self.ws.poll_event()
178            except discord.client.ReconnectWebSocket as e:
179                _log.info('Got a request to %s the websocket.', e.op)
180                self.dispatch('disconnect')
181                ws_params.update(sequence=self.ws.sequence, resume=e.resume, session=self.ws.session_id)
182                continue
183            except (OSError,
184                    discord.HTTPException,
185                    discord.GatewayNotFound,
186                    discord.ConnectionClosed,
187                    aiohttp.ClientError,
188                    asyncio.TimeoutError) as exc:
189
190                self.dispatch('disconnect')
191                if not reconnect:
192                    await self.close()
193                    if isinstance(exc, discord.ConnectionClosed) and exc.code == 1000:
194                        # clean close, don't re-raise this
195                        return
196                    raise
197
198                if self.is_closed():
199                    return
200
201                # If we get connection reset by peer then try to RESUME
202                if isinstance(exc, OSError) and exc.errno in (54, 10054):
203                    ws_params.update(sequence=self.ws.sequence, initial=False, resume=True, session=self.ws.session_id)
204                    continue
205
206                # We should only get this when an unhandled close code happens,
207                # such as a clean disconnect (1000) or a bad state (bad token, no sharding, etc)
208                # sometimes, discord sends us 1000 for unknown reasons so we should reconnect
209                # regardless and rely on is_closed instead
210                if isinstance(exc, discord.ConnectionClosed):
211                    if exc.code == 4014:
212                        raise discord.PrivilegedIntentsRequired(exc.shard_id) from None
213                    if exc.code != 1000:
214                        await self.close()
215                        raise
216
217                retry = backoff.delay()
218                _log.exception("Attempting a reconnect in %.2fs", retry)
219                await asyncio.sleep(retry)
220                # Always try to RESUME the connection
221                # If the connection is not RESUME-able then the gateway will invalidate the session.
222                # This is apparently what the official Discord client does.
223                ws_params.update(sequence=self.ws.sequence, resume=True, session=self.ws.session_id)
224
225
226bot = MyBot(command_prefix="?")
227
228
229@bot.event
230async def on_ready():
231    print(f"Sucessfully logged in as {bot.user}")
232
233bot.run("YOUR_BOT_TOKEN")
234

Personally, I think that the following approach, which does include some runtime monkey-patching (but no AST manipulation) is cleaner for this purpose:

1def get_mobile():
2    """
3    The Gateway's IDENTIFY packet contains a properties field, containing $os, $browser and $device fields.
4    Discord uses that information to know when your phone client and only your phone client has connected to Discord,
5    from there they send the extended presence object.
6    The exact field that is checked is the $browser field. If it's set to Discord Android on desktop,
7    the mobile indicator is is triggered by the desktop client. If it's set to Discord Client on mobile,
8    the mobile indicator is not triggered by the mobile client.
9    The specific values for the $os, $browser, and $device fields are can change from time to time.
10    """
11    import ast
12    import inspect
13    import re
14    import discord
15
16    def source(o):
17        s = inspect.getsource(o).split("\n")
18        indent = len(s[0]) - len(s[0].lstrip())
19
20        return "\n".join(i[indent:] for i in s)
21
22    source_ = source(discord.gateway.DiscordWebSocket.identify)
23    patched = re.sub(
24        r'([\'"]\$browser[\'"]:\s?[\'"]).+([\'"])',
25        r"\1Discord Android\2",
26        source_,
27    )
28
29    loc = {}
30    exec(compile(ast.parse(patched), "<string>", "exec"), discord.gateway.__dict__, loc)
31    return loc["identify"]
32import discord
33import os
34from discord.ext import commands
35import mobile_status
36
37discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
38bot = commands.Bot(command_prefix="?")
39
40@bot.event
41async def on_ready():
42    print(f"Sucessfully logged in as {bot.user}")
43
44bot.run(os.getenv("DISCORD_TOKEN"))
45    async def identify(self):
46        """Sends the IDENTIFY packet."""
47        payload = {
48            'op': self.IDENTIFY,
49            'd': {
50                'token': self.token,
51                'properties': {
52                    '$os': sys.platform,
53                    '$browser': 'Discord Android',
54                    '$device': 'Discord Android',
55                    '$referrer': '',
56                    '$referring_domain': ''
57                },
58                'compress': True,
59                'large_threshold': 250,
60                'v': 3
61            }
62        }
63     # ...
64Traceback (most recent call last):
65  File "c:\Users\Achxy\Desktop\fresh\file.py", line 8, in <module>
66    print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
67  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1024, in getsource
68    lines, lnum = getsourcelines(object)
69  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 1006, in getsourcelines
70    lines, lnum = findsource(object)
71  File "C:\Users\Achxy\AppData\Local\Programs\Python\Python39\lib\inspect.py", line 835, in findsource
72    raise OSError('could not get source code')
73OSError: could not get source code
74import discord
75import os
76from discord.ext import commands
77import mobile_status
78import inspect
79
80discord.gateway.DiscordWebSocket.identify = mobile_status.get_mobile()
81print(inspect.getsource(discord.gateway.DiscordWebSocket.identify))
82bot = commands.Bot(command_prefix="?")
83
84@bot.event
85async def on_ready():
86    print(f"Sucessfully logged in as {bot.user}")
87
88bot.run(os.getenv("DISCORD_TOKEN"))
89import asyncio
90import sys
91
92import aiohttp
93
94import discord
95from discord.gateway import DiscordWebSocket, _log
96from discord.ext.commands import Bot
97
98
99class MyGateway(DiscordWebSocket):
100
101    async def identify(self):
102        payload = {
103            'op': self.IDENTIFY,
104            'd': {
105                'token': self.token,
106                'properties': {
107                    '$os': sys.platform,
108                    '$browser': 'Discord Android',
109                    '$device': 'Discord Android',
110                    '$referrer': '',
111                    '$referring_domain': ''
112                },
113                'compress': True,
114                'large_threshold': 250,
115                'v': 3
116            }
117        }
118
119        if self.shard_id is not None and self.shard_count is not None:
120            payload['d']['shard'] = [self.shard_id, self.shard_count]
121
122        state = self._connection
123        if state._activity is not None or state._status is not None:
124            payload['d']['presence'] = {
125                'status': state._status,
126                'game': state._activity,
127                'since': 0,
128                'afk': False
129            }
130
131        if state._intents is not None:
132            payload['d']['intents'] = state._intents.value
133
134        await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify)
135        await self.send_as_json(payload)
136        _log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id)
137
138
139class MyBot(Bot):
140
141    async def connect(self, *, reconnect: bool = True) -> None:
142        """|coro|
143
144        Creates a websocket connection and lets the websocket listen
145        to messages from Discord. This is a loop that runs the entire
146        event system and miscellaneous aspects of the library. Control
147        is not resumed until the WebSocket connection is terminated.
148
149        Parameters
150        -----------
151        reconnect: :class:`bool`
152            If we should attempt reconnecting, either due to internet
153            failure or a specific failure on Discord's part. Certain
154            disconnects that lead to bad state will not be handled (such as
155            invalid sharding payloads or bad tokens).
156
157        Raises
158        -------
159        :exc:`.GatewayNotFound`
160            If the gateway to connect to Discord is not found. Usually if this
161            is thrown then there is a Discord API outage.
162        :exc:`.ConnectionClosed`
163            The websocket connection has been terminated.
164        """
165
166        backoff = discord.client.ExponentialBackoff()
167        ws_params = {
168            'initial': True,
169            'shard_id': self.shard_id,
170        }
171        while not self.is_closed():
172            try:
173                coro = MyGateway.from_client(self, **ws_params)
174                self.ws = await asyncio.wait_for(coro, timeout=60.0)
175                ws_params['initial'] = False
176                while True:
177                    await self.ws.poll_event()
178            except discord.client.ReconnectWebSocket as e:
179                _log.info('Got a request to %s the websocket.', e.op)
180                self.dispatch('disconnect')
181                ws_params.update(sequence=self.ws.sequence, resume=e.resume, session=self.ws.session_id)
182                continue
183            except (OSError,
184                    discord.HTTPException,
185                    discord.GatewayNotFound,
186                    discord.ConnectionClosed,
187                    aiohttp.ClientError,
188                    asyncio.TimeoutError) as exc:
189
190                self.dispatch('disconnect')
191                if not reconnect:
192                    await self.close()
193                    if isinstance(exc, discord.ConnectionClosed) and exc.code == 1000:
194                        # clean close, don't re-raise this
195                        return
196                    raise
197
198                if self.is_closed():
199                    return
200
201                # If we get connection reset by peer then try to RESUME
202                if isinstance(exc, OSError) and exc.errno in (54, 10054):
203                    ws_params.update(sequence=self.ws.sequence, initial=False, resume=True, session=self.ws.session_id)
204                    continue
205
206                # We should only get this when an unhandled close code happens,
207                # such as a clean disconnect (1000) or a bad state (bad token, no sharding, etc)
208                # sometimes, discord sends us 1000 for unknown reasons so we should reconnect
209                # regardless and rely on is_closed instead
210                if isinstance(exc, discord.ConnectionClosed):
211                    if exc.code == 4014:
212                        raise discord.PrivilegedIntentsRequired(exc.shard_id) from None
213                    if exc.code != 1000:
214                        await self.close()
215                        raise
216
217                retry = backoff.delay()
218                _log.exception("Attempting a reconnect in %.2fs", retry)
219                await asyncio.sleep(retry)
220                # Always try to RESUME the connection
221                # If the connection is not RESUME-able then the gateway will invalidate the session.
222                # This is apparently what the official Discord client does.
223                ws_params.update(sequence=self.ws.sequence, resume=True, session=self.ws.session_id)
224
225
226bot = MyBot(command_prefix="?")
227
228
229@bot.event
230async def on_ready():
231    print(f"Sucessfully logged in as {bot.user}")
232
233bot.run("YOUR_BOT_TOKEN")
234import sys
235from discord.gateway import DiscordWebSocket, _log
236from discord.ext.commands import Bot
237
238
239async def identify(self):
240    payload = {
241        'op': self.IDENTIFY,
242        'd': {
243            'token': self.token,
244            'properties': {
245                '$os': sys.platform,
246                '$browser': 'Discord Android',
247                '$device': 'Discord Android',
248                '$referrer': '',
249                '$referring_domain': ''
250            },
251            'compress': True,
252            'large_threshold': 250,
253            'v': 3
254        }
255    }
256
257    if self.shard_id is not None and self.shard_count is not None:
258        payload['d']['shard'] = [self.shard_id, self.shard_count]
259
260    state = self._connection
261    if state._activity is not None or state._status is not None:
262        payload['d']['presence'] = {
263            'status': state._status,
264            'game': state._activity,
265            'since': 0,
266            'afk': False
267        }
268
269    if state._intents is not None:
270        payload['d']['intents'] = state._intents.value
271
272    await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify)
273    await self.send_as_json(payload)
274    _log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id)
275
276
277DiscordWebSocket.identify = identify
278bot = Bot(command_prefix="?")
279
280
281@bot.event
282async def on_ready():
283    print(f"Sucessfully logged in as {bot.user}")
284
285bot.run("YOUR_DISCORD_TOKEN")
286

As to why editing the library source code did not work for you, I can only assume that you have edited the wrong copy of the file, as people have commented.

Source https://stackoverflow.com/questions/70903401

QUESTION

uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set

Asked 2022-Feb-03 at 10:56

I'm having an issue when i'm uploading app bundle to the play console that You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. but my manifest file includes the property.

Manifest file

1    <?xml version="1.0" encoding="utf-8"?>
2    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3        package="**********">
4        <!-- io.flutter.app.FlutterApplication is an android.app.Application that
5             calls FlutterMain.startInitialization(this); in its onCreate method.
6             In most cases you can leave this as-is, but you if you want to provide
7             additional functionality it is fine to subclass or reimplement
8             FlutterApplication and put your custom class here. -->
9        <uses-permission android:name="android.permission.INTERNET" />
10        <uses-permission android:name="android.permission.CAMERA" />
11        <uses-feature android:name="android.hardware.camera" />
12        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
13        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
14        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
15        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
16        <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
17        <uses-permission android:name="android.permission.WAKE_LOCK"/>
18        <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
19        <uses-permission android:name="android.permission.VIBRATE" />
20        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
21        <uses-permission android:name="android.permission.WAKE_LOCK" />
22        <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
23        <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
24    
25    
26        <application
27            android:name="io.flutter.app.FlutterApplication"
28            android:label="*****"
29            android:requestLegacyExternalStorage="true"
30            android:usesCleartextTraffic="true"
31            android:icon="@mipmap/ic_launcher">
32    
33    
34            <meta-data
35              android:name="com.google.firebase.messaging.default_notification_icon"
36              android:resource="@drawable/ic_stat_artboard_1" />
37    
38            <meta-data android:name="com.google.android.geo.API_KEY"
39                android:value="Z*********"/>
40    
41            <provider
42                android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
43                android:authorities="im.mingguang.mingguang_app.flutter_downloader.provider"
44                android:grantUriPermissions="true"
45                android:requestLegacyExternalStorage="true">
46                <meta-data
47                    android:name="android.support.FILE_PROVIDER_PATHS"
48                    android:resource="@xml/provider_paths"/>
49            </provider>
50    
51            <provider
52        android:name="androidx.core.content.FileProvider"
53        android:authorities="${applicationId}.provider"
54        android:grantUriPermissions="true">
55        <meta-data
56            android:name="android.support.FILE_PROVIDER_PATHS"
57            android:resource="@xml/provider_paths"/>
58    </provider>
59            <activity
60                android:name=".MainActivity"
61                android:launchMode="singleTop"
62                android:theme="@style/LaunchTheme"
63                android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
64                android:hardwareAccelerated="true"
65                android:exported="true"
66                android:windowSoftInputMode="adjustResize">
67                <intent-filter>
68                    <action android:name="android.intent.action.MAIN"/>
69                    <category android:name="android.intent.category.DEFAULT"/>
70                    <category android:name="android.intent.category.LAUNCHER"/>
71                </intent-filter>
72                <intent-filter>
73                    <action android:name="FLUTTER_NOTIFICATION_CLICK" />
74                    <category android:name="android.intent.category.DEFAULT"/>
75                </intent-filter>
76            </activity>
77            <!-- Don't delete the meta-data below.
78                 This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
79            <meta-data
80                android:name="flutterEmbedding"
81                android:value="2" />
82        </application>
83    </manifest>
84

Play Console Error

enter image description here

ANSWER

Answered 2022-Jan-12 at 23:56

I face the same Issue but i solved by writing android:exported="true" in activity bellow the android:name=".MainActivity" image shown

Source https://stackoverflow.com/questions/70684516

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Icon

Tutorials and Learning Resources are not available at this moment for Icon

Share this Page

share link

Get latest updates on Icon