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

Error while actions #10

Closed
wurikiji opened this issue Oct 5, 2019 · 8 comments
Closed

Error while actions #10

wurikiji opened this issue Oct 5, 2019 · 8 comments

Comments

@wurikiji
Copy link

wurikiji commented Oct 5, 2019

image

I got errors like above. Could you give me some hints to debug it?
I just copied and pasted your example scripts.

workflows

name: Flutter Test and Build

on: [push]

jobs:
  test:
    name: Test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - uses: subosito/flutter-action@v1
        with:
          channel: 'master'
      - run: flutter pub get
      - run: flutter test
      - run: flutter build apk
@mackattack3k
Copy link

I hade the same problem and I think it comes from only specifying channel: master. This causes version.replace to fail.

It seems as if the master version isn't available in releases_OS.json and therefore not supported

@wurikiji
Copy link
Author

wurikiji commented Oct 5, 2019

@mackattack3k Thanks for oyour information. I will try beta and comment a result here.

@subosito
Copy link
Owner

subosito commented Oct 5, 2019

@wurikiji as @mackattack3k said, master is not a valid name for channel. As you can see on https://flutter.dev/docs/development/tools/sdk/releases?tab=linux, the valid channel names are: stable, beta and dev.

@wurikiji
Copy link
Author

wurikiji commented Oct 6, 2019

Thank you so much all of you @mackattack3k @subosito. It is solved with other channel names.

@wurikiji wurikiji closed this as completed Oct 6, 2019
jiayike added a commit to jiayike/flutter_clock that referenced this issue Feb 10, 2020
@KLD
Copy link

KLD commented Feb 29, 2020

I'll just leave this here so it appears in search:

##[error]Cannot read property 'replace' of undefined

@liudonghua123
Copy link

I have the same issue, I want to build desktop app, so the master channel is a must, I read the doc, and I think maybe the dev channel is close to master channel. But desktop features is still not available in dev channel.

image

@liudonghua123
Copy link

I can change to master channel in the following command.

      - uses: subosito/flutter-action@v1
        with:
          channel: "dev" # optional, default to: 'stable'
      - run: flutter channel master
      - run: flutter upgrade
      - run: flutter config --enable-windows-desktop
      - run: flutter pub get
      - run: flutter build windows

@wurikiji
Copy link
Author

@liudonghua123 Thanks! This is simple and great solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants