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

Unable to integrate project #14

Open
martintschemernjak opened this issue Sep 24, 2020 · 3 comments
Open

Unable to integrate project #14

martintschemernjak opened this issue Sep 24, 2020 · 3 comments

Comments

@martintschemernjak
Copy link

martintschemernjak commented Sep 24, 2020

Hi,

I followed the tutorial but i can not get it to work...
I'm on a windows machine and i try to build a nativescript app for ios.

This is how my .nsremote.config.json looks like:

{ "circleci": { "sshRepositoryURL": "[email protected]:**********************************.git" } }

my .nsremote.env.json:

{ "local": { "CIRCLE_CI_API_ACCESS_TOKEN": "**********************************" } }

I followed the setup for CircleCI, created an account there, linked it to my Github account and uploaded a ssh key. The same ssh key i have localy.

If I try to build the app with tns build ios, I get the following message:

Unable to integrate the "*" project with Circle CI. Make sure that "" is an initialized GitHub repository and the Circle CI OAuth application is authorized in your GitHub organization - https://circleci.com/integrations/github

If I take a look into CircleCI I see that the build failed, but the error message there is the following:

!/bin/sh -eo pipefail
No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration.

Warning: This configuration was auto-generated to show you the message above.
Don't rerun this job. Rerunning will have no effect.
false

If I now create a .circleci/config.yml file like this:

version: 2
jobs:
   build:
     docker:
       - image: node:13
     steps:
       - checkout

       - restore_cache:
           keys:
           - v1-dependencies-{{ checksum "package.json" }}
           # fallback to using the latest cache if no exact match is found
           - v1-dependencies-

       - run: npm install

       - save_cache:
           paths:
             - node_modules
           key: v1-dependencies-{{ checksum "package.json" }}

the build runs through on CircleCI, but I still get the error message "Unable to integrate the project" like above.

So my questions are now:

  • Does anybody have an idea, what the "Unable to integrate the project" error means? As I said I am connected with github to my circleCI Account
  • Do I need a .circleci/config.yml file? It is not mentioned in the tutorials.
  • If I need the .circleci/config.yml file, how does it have to look like to build an app for ios?

Thank you very much,
Best regards,
Martin

@EdJones
Copy link

EdJones commented Dec 19, 2020

I got this, too. Any resolutions?
(I tried upgrading to NS 7, which ended with #17 )

@EdJones
Copy link

EdJones commented Jan 23, 2021

This error is generated when

const followRepoResponse = await this.$httpClient.httpRequest({
                url: `https://circleci.com/api/v1.1/project/github/${this.gitRepositoryName}/follow?circle-token=${this.circleCiApiAccessToken}`,
                method: "POST"
            });

fails. Barring a network or server issue, the problem is likely the CIRCLE_CI_API_ACCESS_TOKEN.
Set one here: https://app.circleci.com/settings/user/tokens
And make sure it's the one entered in nsremote.env.json:

{
    "local": {
       
       "CIRCLE_CI_API_ACCESS_TOKEN": "*******************************************"
    },
    "remote": {
        ...
      }}

I believe that nativescript-remote-builds creates its own .config.yml. Although, like you, I got movement when I created one.

We used the "httpsRepositoryURL": "https://github.com/<account name>/<repo name>.git" format in nsremote.config.json.

The remote service is also looking for a GITHUB_ACCESS_TOKEN, either in nsremove.env.json, or on your machine.

@IvanGrigorov
Copy link

One other remark on the failed integration can be found here:
#24

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

3 participants