buildozer icon indicating copy to clipboard operation
buildozer copied to clipboard

SSL Certificate Problem on MacOS | Action and log

Open onuratakan opened this issue 3 years ago • 8 comments
trafficstars

2022-08-01T11:37:43.0997430Z [DEBUG   ] Processing dependencies for Flask==2.0.0
2022-08-01T11:37:43.1046970Z [DEBUG   ] Searching for itsdangerous>=2.0
2022-08-01T11:37:43.1051680Z [DEBUG   ] Reading https://pypi.org/simple/itsdangerous/
2022-08-01T11:37:43.1232400Z [DEBUG   ] Download error on https://pypi.org/simple/itsdangerous/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) -- Some packages may not be found!
2022-08-01T11:37:43.1234260Z [DEBUG   ] Couldn't retrieve index page for 'itsdangerous'
2022-08-01T11:37:43.1235600Z [DEBUG   ] Scanning index of all packages (this may take a while)
2022-08-01T11:37:43.1236560Z [DEBUG   ] Reading https://pypi.org/simple/
2022-08-01T11:37:43.1291760Z [DEBUG   ] Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) -- Some packages may not be found!
2022-08-01T11:37:43.1294990Z [DEBUG   ] No local packages or working download links found for itsdangerous>=2.0
2022-08-01T11:37:43.1295760Z [DEBUG   ] error: Could not find suitable distribution for Requirement.parse('itsdangerous>=2.0')
2022-08-01T11:37:43.1750600Z Exception in thread background thread for pid 50622:
  build-api-ios:
    runs-on: macos-latest
    environment: Builds       
    strategy:
      matrix:
        python-version: [3.8]
    steps:
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - uses: actions/checkout@v2
      - name: Setup environment
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          pip install -e .
          pip install Cython cookiecutter pbxproj buildozer==1.4.0
      - name: Check buildozer installation
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          buildozer --help
      - name: Initialize buildozer in project folder
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
      - name: Install dependencies
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          brew install autoconf automake libtool pkg-config
      - name: Get Date
        id: get-date
        run: |
          echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
        shell: bash

      - name: Cache Buildozer global directory
        uses: actions/cache@v2
        with:
          path: .buildozer_global
          key: buildozer-global-${{ hashFiles('buildozer.spec') }} # Replace with your path

      - uses: actions/cache@v2
        with:
          path: .buildozer
          key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}
        
      - name: buildozer ios debug
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          buildozer --profile api ios debug
      - name: Zip
        run: sudo zip -r api_ios_${{ github.event.release.tag_name }} bin/
        

      - name: Upload artifacts
        uses: actions/upload-artifact@v2
        with:
          path: api_ios_${{ github.event.release.tag_name }}.zip

      - uses: AButler/[email protected]
        if: github.event_name == 'release'
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}        
          files: 'api_ios_${{ github.event.release.tag_name }}.zip'

Originally posted by @onuratakan in https://github.com/kivy/buildozer/issues/1480#issuecomment-1201524093

onuratakan avatar Aug 02 '22 15:08 onuratakan

Hi @onuratakan!

Considering that the error is happening during a github-action run, can you link the failed job, so I can take a deeper look at it?

misl6 avatar Aug 02 '22 16:08 misl6

Hi @onuratakan!

Considering that the error is happening during a run, can you link the failed job, so I can take a deeper look at it?github-action

Now ı fix by adding a export to before build but it is a temp and unsecure solution.

    - name: buildozer ios debug
      run: |
        source .ci/osx_ci.sh
        arm64_set_path_and_python_version ${{ matrix.python }}
        export PYTHONHTTPSVERIFY=0
        buildozer --profile gui ios debug

Error action https://github.com/Decentra-Network/Decentra-Network/runs/7610018692?check_suite_focus=true

onuratakan avatar Aug 02 '22 16:08 onuratakan

Agree about the "unsecure".

Looks there's some issue on the flask recipe, which could probably be removed (so there's a high chance that the SSL issue is just a symptom, not the cause):

2022-08-01T11:37:42.5864940Z [DEBUG   ] running install
2022-08-01T11:37:42.7290380Z [DEBUG   ] Checking .pth file support in /Users/runner/work/Decentra-Network/Decentra-Network/.buildozer/ios/platform/kivy-ios/dist/root/python/lib/python3.9/site-packages/
2022-08-01T11:37:42.7295350Z [DEBUG   ] /Users/runner/work/Decentra-Network/Decentra-Network/.buildozer/ios/platform/kivy-ios/dist/hostpython3/bin/python -E -c pass
2022-08-01T11:37:42.7595850Z [DEBUG   ] TEST FAILED: /Users/runner/work/Decentra-Network/Decentra-Network/.buildozer/ios/platform/kivy-ios/dist/root/python/lib/python3.9/site-packages/ does NOT support .pth files
2022-08-01T11:37:42.7603300Z [DEBUG   ] bad install directory or PYTHONPATH
2022-08-01T11:37:42.7605830Z [DEBUG   ] 
2022-08-01T11:37:42.7609090Z [DEBUG   ] You are attempting to install a package to a directory that is not
2022-08-01T11:37:42.7614320Z [DEBUG   ] on PYTHONPATH and which Python does not read ".pth" files from.  The
2022-08-01T11:37:42.7618190Z [DEBUG   ] installation directory you specified (via --install-dir, --prefix, or
2022-08-01T11:37:42.7620100Z [DEBUG   ] the distutils default setting) was:

Will investigate about it.

misl6 avatar Aug 02 '22 17:08 misl6

Meanwhile, you can try to remove the flask dependency and see what happens?

misl6 avatar Aug 02 '22 17:08 misl6

Meanwhile, you can try to remove the dependency and see what happens?flask

Okey ı will share the results and ı have a custom recipes maybe its triggered from here.

Now ı checked the recipes there is no problem same with python for android library

onuratakan avatar Aug 02 '22 17:08 onuratakan

Meanwhile, you can try to remove the dependency and see what happens?flask

https://github.com/Decentra-Network/Decentra-Network/runs/7636901231?check_suite_focus=true

onuratakan avatar Aug 02 '22 17:08 onuratakan

The results We have a problem about flask

xcodebuild: error: The directory /Users/runner/work/Decentra-Network/Decentra-Network/.buildozer/ios/platform/ios-deploy does not contain an Xcode project.

But maybe we have an another problem.

onuratakan avatar Aug 02 '22 17:08 onuratakan