Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

I can't add 3 of my roles (Angular error) #177

Closed
Ilyes512 opened this issue Aug 9, 2016 · 10 comments
Closed

I can't add 3 of my roles (Angular error) #177

Ilyes512 opened this issue Aug 9, 2016 · 10 comments
Assignees

Comments

@Ilyes512
Copy link

Ilyes512 commented Aug 9, 2016

Hey guys,

So Ansible Galaxy sees 12 roles of which I can't seem to "Activate" 3 of them:

image

When I try to activate the first oneIlyes512/ansible-role-base it will display "Running", but it will be stuck at it. Looking at the console I see the below Angular error. In the end the role does not get added and when I refresh it will also display at not activated (so it stays as it was).

image

The t2 other roles do exactly the same thing. The repo's for the 3 roles can be found here:

I have this issue for over a month now. I tweeted it to @ansible, but did not receive any answers. At the time I did not know about this issues repo.

The tweet

I got no idea what it can be. I can think of one more thing to do and that is create a new role by executing $ ansible-galaxt init [name] and then copy/edit everything in again.

@s-hertel
Copy link

s-hertel commented Aug 12, 2016

Hi!

Thanks very much for your submission to Ansible. It sincerely means a lot to us. I'm sorry for any frustration caused by the lack of response to the tweet.

I cloned your Ilyes512/ansible-role-base repo and was able to successfully import the role in galaxy using the app and the command line interface. Here is the output I got:

Starting import 22904: role_name=test_ilyes_role repo=s-hertel/test_ilyes_role ref=
Retrieving Github repo s-hertel/test_ilyes_role
Accessing branch: master
Parsing and validating meta/main.yml
Parsing galaxy_tags
Found galaxy_info.categories. Update meta/main.yml to use galaxy_info.galaxy_tags.
Parsing platforms
Adding dependencies
Parsing and validating README
Adding repo tags as role versions
Import completed
Status SUCCESS : warnings=1 errors=0

Just clarifying a couple things so I can work on figuring out what is happening:

  1. By not being "activated" do you mean the process of importing the role fails?
  2. What is the Angular error you are receiving? (can you provide console output?)

We will definitely see your comments on this issue when reading this ticket, but may not be able to reply promptly. You may also wish to join one of our two mailing lists which are very active:

https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks
https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code.

Thank you once again for this and your interest in Ansible!

@Ilyes512
Copy link
Author

Ilyes512 commented Aug 12, 2016

  1. I mean the toggle on the left? If that's called importing then yes. But when I hover over one of the other roles right button, it says "Import role". So I guess the toggle is for activating the role on AG, but in my case it won't activate. It wont show up on Galaxy when I search for the role. It's all in the image? Exactly 3 roles are not "activated". Those are exactly the roles I can't toggle on.
  2. Not sure if it's because you don't see the images, but the Angular error can be seen in the second image. Here is copy of the error as text:
TypeError: Cannot read property '0' of undefined
    at E (galaxy.roleAddApp.min.c42743693503.js:1)
    at angular.js:14745
    at n.$eval (angular.js:15989)
    at n.$digest (angular.js:15800)
    at n.$apply (angular.js:16097)
    at h (angular.js:10546)
    at K (angular.js:10744)
    at XMLHttpRequest.z.onload (angular.js:10685)

All the info was provided in the above message? If you didn't see the images I could understand the confusion, but if you do then it right there? I could edit the images and point them out, but I the toggles that aren't activated (set to 1, true, whatever it's called). The toggle is bound to model key is_enabled. The action that toggle's the value is toggle() bound to the switch.

If it's still not clear I will create a cast video of it. Further details below:

OS: OSX 10.11.6
Browser: Chrome Version 52.0.2743.82 (64-bit)

Cheers Ilyes

@Ilyes512
Copy link
Author

Is there an update on this issue, because I still have it? It really been months now that I have this issue.

@s-hertel s-hertel added bug and removed needs_info labels Aug 30, 2016
@Ilyes512
Copy link
Author

Is there anyway I can help resolve this? If no one can reproduce this then I would want to ask the dev team to just login as "me" (Ilyes512) and try to import the roles. I really want this issue resolved before I put in more energy into creating more Roles and improving my existing once.

@chouseknecht
Copy link
Contributor

I'm not able to reproduce this either. If I clone the roles and import them, they work just fine. Seems to be something specific at the Browser level.

  • Have you tried a different browser?
  • Have you tried importing via ansible-galaxy command?

@Ilyes512
Copy link
Author

Ilyes512 commented Oct 7, 2016

I already tried it on another Macbook (using MacOS 10.12 and OSx 10.11) using Chrome and Safari without success. I also just now tried it in Firefox without success.

I did not try the ansible-galaxy cli tool so I just did, but I get the fallowing error when I run: $ ansible-galaxy import Ilyes512 ansible-role-base --status -vvv

No config file found; using defaults
Opened /Users/ilyes512/.ansible_galaxy
https://galaxy.ansible.com/api/v1/imports/?github_user=Ilyes512&github_repo=ansible-role-base
ERROR! Unexpected Exception: list index out of range
the full traceback was:

Traceback (most recent call last):
  File "/usr/local/bin/ansible-galaxy", line 92, in <module>
    exit_code = cli.run()
  File "/usr/local/Cellar/ansible/2.1.2.0/libexec/lib/python2.7/site-packages/ansible/cli/galaxy.py", line 133, in run
    self.execute()
  File "/usr/local/Cellar/ansible/2.1.2.0/libexec/lib/python2.7/site-packages/ansible/cli/__init__.py", line 103, in execute
    fn()
  File "/usr/local/Cellar/ansible/2.1.2.0/libexec/lib/python2.7/site-packages/ansible/cli/galaxy.py", line 599, in execute_import
    task = self.api.get_import_task(task_id=task[0]['id'])
IndexError: list index out of range

Not really familiar with Python so not sure what's happening.

@Ilyes512
Copy link
Author

So almost nearing 1 year! Just unbelievable...

I still cant add them and I have no idea why? Already tried everything I could possibly do... I am out of idea's. I just can't continue working on Ansible related things/roles if something like this holds me back. What can I do to resolve this?

I don't want to give up on this, but just don't know how to proceed.

@Ilyes512
Copy link
Author

Okey this is something really strange, but out of a limp I just changed my role name from "base" to "Base" it now it does successfully import!!!??? The error handling is just terrible!

image

@chouseknecht
Copy link
Contributor

@Ilyes512

Apologies for not getting back to this in awhile. I've been busy working on other things.

I added error handling that should catch the error when import task creation fails. The new code is available for testing on our QA site https://galaxy-qa.ansible.com.

This does not solve the problem, but it at least presents an error message, and puts the UI back to a usable state. To see what the problem truly is, you'll need to check the Network tab in your browser's developer tools console. Inspecting the network error may yield more information.

If you could give it a try on the QA site, and let me know what you find in the network error details, I would appreciate it.

--Chris

@chouseknecht
Copy link
Contributor

This issue was moved to ansible/galaxy#81

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

No branches or pull requests

3 participants