Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Getting below error on running fledge beta #23

Open
v2Nitesh opened this issue Apr 17, 2019 · 10 comments
Open

Getting below error on running fledge beta #23

v2Nitesh opened this issue Apr 17, 2019 · 10 comments
Labels
good first issue Good for newcomers waiting for response Issue addressed, response anticipated

Comments

@v2Nitesh
Copy link

fledge beta
Git error. Command: git log origin/dev..dev
fatal: ambiguous argument 'origin/dev..dev': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

Please suggest something to fix this...

@mmcc007
Copy link
Owner

mmcc007 commented Apr 17, 2019

This is likely a git set-up issue and not related to fledge:

https://stackoverflow.com/questions/43842239/unknown-revision-or-path-not-in-the-the-working-tree-error-for-first-push-to-emp

Let me know if you continue having a problem with running 'fledge beta' after resolving any git set-up issues.

Good luck!

PS:
If this issue resolves as a git issue and you can describe what the problem was and how you resolved it, it may be possible to document it or automate it.

@mmcc007 mmcc007 added the good first issue Good for newcomers label Apr 17, 2019
@mmcc007
Copy link
Owner

mmcc007 commented Apr 18, 2019

A little context that might help resolve this issue:
Before starting a beta, as a precaution, fledge runs some checks on the local dev branch. This is important because the experience of using fledge should be consistent. The checks made before running the beta are to try to find things are not as expected.

One of these checks is to test if a push is needed in the local dev branch. This is done using:

git log origin/dev..dev

This may not be the ideal way to do this and other candidate ways are available:

git log --branches --not --remotes
git log @{u}..
git cherry -v

(from this stackoverflow)

Let me know if you find a way to run this check that works for you. Maybe some of the alternatives above will work more consistently so this error message can be avoided.

If a more consistent way is found, it will most likely make it's way into fledge.

@v2Nitesh
Copy link
Author

I have followed all the steps as well as did multiple workaround suggested in different blogs. I have added you in my GitHub repository just for your review so that we can resolve this issue together.

Thanks for you suggestions. Appreciated...Thanks in advance.

@mmcc007
Copy link
Owner

mmcc007 commented Apr 19, 2019

One way to confirm everything is as anticipated when using fledge, is to fork the repo fledge uses for a demo app and run a beta release on it:
https://github.com/mmcc007/todo

The todo app in this repo has been delivered all the way to both app stores using fledge. You can see the logs of running a beta and a release here:
https://travis-ci.org/mmcc007/todo

If you make changes to this todo app on your computer and the problem in this issue re-occurs, then we can learn more about the cause and hopefully find a solution.

The solution will then likely become part of the documentation or an automated validation step of fledge (or both).

PS: it may even be worth adding a stage to travis to trigger a beta and a release (and an install for that matter) which would trigger the corresponding jobs on travis to run the beta and the release. This may make it more clear how fledge works (for new users). What do you think?

@v2Nitesh
Copy link
Author

v2Nitesh commented Apr 23, 2019

I have tried the above solution I have fork the repo and "fledge beta" below is the output for same.

✘ niteshmeshram@NitMac  ~/Documents/V2Apps/todo   dev  fledge beta
Beta release of 0.0.24 started on build server.

Below is the output for "fledge release"

✘ niteshmeshram@NitMac  ~/Documents/V2Apps/todo   dev  fledge release
Release of 0.0.24 started on build server.

Also I have check Travis but there is no updates for "todo" repository.

Just an observation Todo has "dev" & "master" branch. Is this mendatory to name the branches like that only.

Please check and let me know your thoughts.

@mmcc007
Copy link
Owner

mmcc007 commented Apr 24, 2019

I looked at the build in travis of your fork:
https://github.com/v2Nitesh/todo
and found only one build:
https://travis-ci.org/v2Nitesh/todo/builds/523436073
This is a release build.

I expected to find a beta build similar to:
https://travis-ci.org/mmcc007/todo/builds/493633473

This indicates there was probably a setup problem with the beta build.
As a precaution, you might want to try to go over the installation and set-up steps again as documented in:
https://mmcc007.github.io/fledge

Only the happy path has been covered in fledge. So there is likely something that fledge is not currently catching that is causing this problem. For example:

  • no change was made to source code (in your dev branch)... a beta release expects that a change has been made to the source code. Try making a minor change to the source code in dev and fire-off another beta release.
  • a full release was triggered... fledge should have prevented this because fledge expects artifacts to be present in the both stores (from a previous beta release)... may need to add a check for this in fledge.
  • the full release is missing secret variables... this indicates you have not added them .
    See https://mmcc007.github.io/fledge for details on how to set-up secret variables
    This is an example of a successful full release:
    https://travis-ci.org/mmcc007/todo/builds/493657475

The 'dev' and 'master' branches are currently the default names for simplicity. They can be abstracted to any name in the future, but for now are the default.

Let's start with fixing the beta-not-triggering problem and go from there.

@v2Nitesh
Copy link
Author

v2Nitesh commented Apr 24, 2019

Hi,

I have followed the given steps but still no luck. Travis-Nitesh/todo.

Also the documents seems not that easy to understand about the environment variables later on I have followed below. Configuration Details.

I have only configured below variables in Travis, to just check the iOS build first.

FASTLANE_USER
This is your Apple ID (without 2-factor authentication). For example, [email protected].

FASTLANE_PASSWORD
This is your Apple ID password. For travis, if there are special characters the password should be enclosed in single quotes.

But still there is an error. Can you please help me to figure it out.

Does this required any other configuration in Flutter, iOS and Android app ? After setting only configurations information will everything work perfectly fine ?

Thanks in advice for your time.

@mmcc007
Copy link
Owner

mmcc007 commented Apr 24, 2019

Great!... looks like the beta build is being triggered.

Both jobs are generating errors related to signing

So each job requires signing to be setup. Not an easy thing to do, especially if for the first time.

Let's take each job separately (the iOS and Android build jobs):

  1. iOS job
    Signing is expected to be setup correctly

    • the iOS job uses Fastlane's match (see https://docs.fastlane.tools/actions/match/)
      • hint: this requires a separate PRIVATE repo
    • once match is complete, set the following secret variables in travis:
      • PUBLISHING_MATCH_CERTIFICATE_REPO (with embedded password)
      • MATCH_PASSWORD
    • your app identifier, team_id and itc_team_id should be setup correctly in Appfile
  2. Android job

Note: you should follow all the 'configuration' directions in https://mmcc007.github.io/fledge to make sure everything is setup correctly for your todo app.

Let's see how far into beta release this gets us.

@mmcc007 mmcc007 added the waiting for response Issue addressed, response anticipated label Apr 27, 2019
@niranjan-b-prajapati
Copy link

niranjan-b-prajapati commented Dec 9, 2019

@mmcc007 As I am too facing the same issue. I have a few queries, they might seem silly.

  1. Do I need to do settings for both iOS and Android for the fledge beta command to be executed successfully?

  2. Do I need to push the code changes done in dev branch to remote branch for the fledge beta command to be executed successfully as I wanted to be sure that the setup done by me is properly working then only I was willing to implement and test android settings first and then push the code to the dev branch and proceed to iOS settings?

@mmcc007
Copy link
Owner

mmcc007 commented Apr 1, 2020

@niranjan-b-prajapati you can test locally for android using

cd android
fastlane beta

and for ios

cd ios
fastlane beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers waiting for response Issue addressed, response anticipated
Projects
None yet
Development

No branches or pull requests

3 participants