Giter VIP home page Giter VIP logo

Comments (27)

kinggolf avatar kinggolf commented on May 24, 2024 1

5.3.20 is working for me on both iOS and Android. This feels similar to previous issues with Ionic/Capacitor splash screen updates not working immediately. It is something like the Xcode is cacheing values for some time, but eventually starts working. But not sure...

from capacitor-updater.

joshstrange avatar joshstrange commented on May 24, 2024 1

I'm using @capacitor/[email protected] and @capgo/[email protected] and it's working for Android/iOS locally (or rather the builds complete and the app launches in the simulator/emulator). I'm about to kick off GH Action builds to build and push to the stores. If I don't report back you can assume that worked for me.

from capacitor-updater.

khamaileon avatar khamaileon commented on May 24, 2024

I just updated from 5.2.35 to 5.3.9 and I have the same problem.

Process: app.example, PID: 8684
java.lang.RuntimeException: Unable to start activity ComponentInfo{app.example/app.example.MainActivity}: java.lang.RuntimeException: appId is required
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8762)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: java.lang.RuntimeException: appId is required
	at ee.forgr.capacitor_updater.CapacitorUpdaterPlugin.load(CapacitorUpdaterPlugin.java:168)
	at com.getcapacitor.PluginHandle.loadInstance(PluginHandle.java:115)
	at com.getcapacitor.PluginHandle.load(PluginHandle.java:105)
	at com.getcapacitor.PluginHandle.<init>(PluginHandle.java:65)
	at com.getcapacitor.Bridge.registerPlugin(Bridge.java:644)
	at com.getcapacitor.Bridge.registerAllPlugins(Bridge.java:600)
	at com.getcapacitor.Bridge.<init>(Bridge.java:215)
	at com.getcapacitor.Bridge.<init>(Unknown Source:0)
	at com.getcapacitor.Bridge$Builder.create(Bridge.java:1519)
	at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:42)
	at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:36)
	at android.app.Activity.performCreate(Activity.java:8591)
	at android.app.Activity.performCreate(Activity.java:8570)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325) 
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loopOnce(Looper.java:226) 
	at android.os.Looper.loop(Looper.java:313) 
	at android.app.ActivityThread.main(ActivityThread.java:8762) 
	at java.lang.reflect.Method.invoke(Native Method) 
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) 
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) 

from capacitor-updater.

kinggolf avatar kinggolf commented on May 24, 2024

Exact same issue here when updating from 5.2.35 to 5.3.10.

from capacitor-updater.

G3z avatar G3z commented on May 24, 2024

Android fails to read appId properly from config.getString("appId", "");

this check has been introduced in 5.3.3 (so 5.3.2 should work)

final CapConfig config = CapConfig.loadDefault(this.getActivity());
this.implementation.appId = config.getString("appId", "");
this.implementation.appId =
this.getConfig().getString("appId", this.implementation.appId);
if (!"".equals(implementation.appId)) {
Log.i(CapacitorUpdater.TAG, "appId: " + implementation.appId);
throw new RuntimeException("appId is required");
}

from capacitor-updater.

yakovyarmo avatar yakovyarmo commented on May 24, 2024

same issue

from capacitor-updater.

kinggolf avatar kinggolf commented on May 24, 2024

5.3.11 is working on Android. Thank you Capgo team!

from capacitor-updater.

macsupport avatar macsupport commented on May 24, 2024

Sadly, same error in 5.3.11 in iOS. Crashes the App

from capacitor-updater.

kinggolf avatar kinggolf commented on May 24, 2024

@macsupport 5.3.11 is working for me on iOS build. Android OK & iOS OK.

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

@macsupport can you check to do a cap sync ? sometimes that the missing part

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

same issue here ...

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

It fails on Android and iOS and prevents the app from starting ... with the exact same reason described above ...

from capacitor-updater.

macsupport avatar macsupport commented on May 24, 2024

Just installed the newest version, 5.3.20. Same issue for me. ( I always do a cap sync)

Capacitor-updater: appId is empty CapgoCapacitorUpdater/CapacitorUpdaterPlugin.swift:72: Fatal error: appId is empty

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

@macsupport @Oidlichtnwoada are you using capacitor 5?
I added this check because the updater was crashing otherwise at runtime with app using v5 with capacitor v4

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

@riderx Yes I am using Capacitor 5.5.0

from capacitor-updater.

macsupport avatar macsupport commented on May 24, 2024

Yes, 5.5

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

If any of you are available to call, I would like to live debug it.
https://cal.com/martindonadieu/meet

from capacitor-updater.

macsupport avatar macsupport commented on May 24, 2024

Sadly, same issue in 5.3.26

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

@macsupport are you available for a call i need to look with you

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

@riderx
I think the error is here:

final CapConfig config = CapConfig.loadDefault(this.getActivity());
this.implementation.appId = config.getString("appId", "");
this.implementation.appId =
this.getConfig().getString("appId", this.implementation.appId);
if (!"".equals(implementation.appId)) {
Log.i(CapacitorUpdater.TAG, "appId: " + implementation.appId);
throw new RuntimeException("appId is required");
}

I have no idea what CapConfig is doing, but I have not set appId in the plugin options as it can be queried from the app,
the error is thrown when the appId is not equal to the empty string, should not it be the other way around ...

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

The cap config is the global config not the plugin config.
So the plugin try to read the capacitor config file and find the appID in it.
If you have a capacitor config with appID at the root it should work.
And it works for many apps, there is only few who fail and that why the check is made.
I got some users complaining capgo wasn’t working for them and the issue was appID missing so now the plugin explicitly crash if he cannot find it

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024
image @riderx Thanks, this was the issue ... However I do not want to add appId, since we are using the same capacitor config for multiple apps with different Ids, you could just read out the id with https://www.npmjs.com/package/@capacitor/app which is the easiest and safest way, as this is the id used by the running app, not the id that was written to the config when the app was first generated and was later not changed ... the appid is just needed in the config for generating the first cap project and its used for nothing else ... or you can use some Kotlin/Java/Swift/Objective-C code to read the app id ...

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

Hello @Oidlichtnwoada, for your case it works I agree, this has been done because not everyone have the same appId in IOS and Android in the native.
Capgo was not working for them ( me included )
What I can do is to search for appId in the plugin, then in the root of capacitor config and then if not found default to the native one, i beleive that will work for all.

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

I just pushed the change who read first the native bundle, we should now be good on that one !
Thanks all for your feedback, i'm really sorry that blocked you so long.
I leave it open until you confirm this fix:
https://github.com/Cap-go/capacitor-updater/tree/5.3.28

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

@riderx Can you make a beta release in npm, such that we can more easily test it?

from capacitor-updater.

riderx avatar riderx commented on May 24, 2024

@Oidlichtnwoada this is released in production already with 5.3.29

from capacitor-updater.

Oidlichtnwoada avatar Oidlichtnwoada commented on May 24, 2024

@riderx everything works now ... thanks ....

from capacitor-updater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.