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

No Profile Data being generated #119

Closed
eljowers opened this issue Jan 17, 2019 · 15 comments
Closed

No Profile Data being generated #119

eljowers opened this issue Jan 17, 2019 · 15 comments

Comments

@eljowers
Copy link

eljowers commented Jan 17, 2019

When setting up CaSS and creating a new user, no profile is generated. I tried running the js scripts from the CaSS Dev Guide to configure an identity and am getting a "Remote Identity not configured." error.

image

image

@FlorianTolk
Copy link
Contributor

The second error (Remote Identity not configured) comes up when trying run both the login and user creation examples in the guide

@eljowers
Copy link
Author

eljowers commented Jan 21, 2019

ran version 0.4.26 on 18.04, when trying to view profile, still getting the following error:

XML Parsing Error: syntax error
Location: https://dev.cassproject.org/api/sky/id/login
Line Number 1, Column 1: login:1:1

User does not exist.
cass.min.js:3366:399
EcRemoteIdentityManager                     http://localhost/js/cass/cass.min.js:3366:399
EcRemote</d.postInner/c.onreadystatechange     http://localhost/js/cass/cass.min.js:1401:301

It looks like the call to skyIdCreate is not getting a username.

@whistlinjoe
Copy link
Collaborator

@eljowers Can you please verify that there are assertions created for this user using the VLRC?

Without any assertions a user will not have any profile information.

@eljowers
Copy link
Author

eljowers commented Jan 23, 2019

I cannot seem create an assertion because it says the user does not exist. Attempting to create and assertion gives the following error:

XML Parsing Error: no root element found Location: https://dev.cassproject.org/api/data/schema.cassproject.org.0.3.Assertion/5f4076ef-0666-4558-bdcf-bd286824f998/1548256386967

@whistlinjoe
Copy link
Collaborator

@eljowers I'm trying to recreate the problem. Are you using https://dev.cassproject.org? Or do have your own installation? The assertion ID above appears to be from dev so I'm not sure if you are using it as a repository or if something is crossed up.

From https://dev.cassproject.org I was able to login with a new user ID (selected the 'CaSS Dev' option in the 'Server' field drop down) and go to the VLRC.

I selected a random (Subject Area 'STS/STSC Certification Examination - STS Examination - Task 1 - Skill In: (7 topics))

image

Then clicked the circle (not the square) next to the top Topic Area (Communicating effectively (e.g., verbal and written))

image

The My Contacts tab then showed the assertion:

image

Changing to the profile view I now can see competency (the competency I chose just happened to exist in 9 frameworks so they all show up in the profile view)

image

If you are having problems creating items through the VLRC, let me know and I can get @Lomilar involved.

Thank you very much for all of your patience.

@FlorianTolk
Copy link
Contributor

You cannot access that UI, as you get stuck with this view:
image

@whistlinjoe
Copy link
Collaborator

@FlorianTolk Hey Florian, that is the gap analysis tool. People won't be populated there until there are person objects created through the VLRC (I can help with that as well).

The profile viewer should be this menu option:
image

@eljowers
Copy link
Author

We are using our own installation of CaSS and we went to the profile viewer and it cannot find any profiles.

@whistlinjoe
Copy link
Collaborator

After you get to the home screen (the one in the above comment), open up the browser console and type 'selectedServer' and hit Enter. What is the result?

image

@FlorianTolk
Copy link
Contributor

http://localhost/api

Going to the VLRC does result in the app slowing down severely (For the local install) and throwing a ton of errors, but it looks like assertions do get made when you go back to the profile manager.

However, running the code from the dev doc:

var agent = EcIdentityManager.ids[0].ppk.toPk();
var subject = agent; //Use if you do not have any contacts in your Identity Manager.
 
var a = new EcAssertion();
a.generateId("http://localhost/api/"); //This is where I think your error was...
a.addOwner(agent);
a.setSubject(subject);
a.setAgent(agent);
a.setCompetency("https://sandbox.cassproject.org/api/custom/data/schema.cassproject.org.0.2.Competency/6bcb0d3f-fa6b-4aa2-b111-92ddecb9a2a8");
a.setLevel("https://sandbox.cassproject.org/api/custom/data/schema.cassproject.org.0.2.Level/99efb8ee-e04d-44df-9a33-8da28bb889e9");
a.setConfidence(0.85); //How confident, from 0-1, is the agent in this assertion?
a.setAssertionDate(Date.now()); //UTC Milliseconds
a.setExpirationDate(Date.now()+1000*60*60*24*30); //UTC Milliseconds, 30 days in the future.
a.setDecayFunction("t"); //Decays linearly with time. Could also be t^2 or sqrt(t)
a.setNegative(false); //This is an assertion that an individual *can* do something, not that they *cannot*.
a.setEvidence(["I saw them do it."]); //An array of evidence is required. Any string (URLs for instance) will do.
EcRepository.save(a,console.log,console.log);

Causes the Profile Explorer to break freezing it during the loading phase and in the console it just reads:

XML Parsing Error: syntax error
Location: http://localhost/api/data/67c9235ed43b72b498f3c47ad968b5aa
Line Number 1, Column 1: 67c9235ed43b72b498f3c47ad968b5aa:1:1
!!!Invalid evidence for demo: I saw them do it. cui-pe-ui-util.js:194:24

Fetching framework for competency: https://sandbox.cassproject.org/api/custom/data/schema.cassproject.org.0.2.Competency/6bcb0d3f-fa6b-4aa2-b111-92ddecb9a2a8 cui-pe-ui-util.js:194:24

handleSearchFrameworkSuccess: 0 cui-pe-ui-util.js:194:24

All assertions queried...

@whistlinjoe
Copy link
Collaborator

@FlorianTolk Did the conversation we had get this issue worked out for now?

@FlorianTolk
Copy link
Contributor

Yes, it did. Do I have your blessing to post our conversation here in case someone else end sup with this problem?

@whistlinjoe
Copy link
Collaborator

Sure thing.

@FlorianTolk
Copy link
Contributor

FlorianTolk commented Feb 1, 2019

Thanks, conversation below

florian.tolk.ctr [2:07 PM]
If the two links VLRC and CASS editior are turned into clear buttins that would solve the largest portion of the confusion. But My concern is more with the assertion creation process using the code, as we can't have these assertions breaking cass

tombuskirk [2:15 PM]

I agree. I don't think the documentation is very clear here. The one thing I would be careful of when using the example is using stuff from multiple repositories at the same time. The UI restricts you to one repository.

a.generateId("http://localhost/api/"); //This should be whatever repository you are using
a.setCompetency("https://sandbox.cassproject.org/api/custom/data/schema.cassproject.org.0.2.Competency/6bcb0d3f-fa6b-4aa2-b111-92ddecb9a2a8"); //This should be a competency from the same repositoryI would just skip the a.setLevel

Depending on how the EcIdentityManager is set up, it's possible that the assertion could be pointing to a competency outside of it's search range

florian.tolk.ctr [2:17 PM]

Well the error that is being thrown complains about the evidence field though, not the competency

tombuskirk [2:19 PM]

Yeah currently the profile will do special things with a formatted evidence string (we are expanding the way evidence is processed for the profile viewer). But it should just ignore it for now. Because of the asynchronous stuff going on, javascript has a tendency to fall back to old callbacks, even if it has bypassed them.

If you are on the home page in the CASS UI and type 'repo.selectedServer' or just 'selectedServer' it should show you what the current repository is

The profile viewer only looks at that repository when trying to match assertions to competencies/frameworks.

florian.tolk.ctr [2:52 PM]

well running the code like this:


var subject = agent; var a = new EcAssertion();

a.generateId("http://localhost/api/"); //This is where I think your error was...

a.addOwner(agent);

a.setSubject(subject);

a.setAgent(agent);

a.setCompetency("http://localhost/api/data/schema.cassproject.org.0.3.Competency/1596e3e0-d235-4845-b725-b769bdb4ed70");

a.setConfidence(0.85); //How confident, from 0-1, is the agent in this assertion?

a.setAssertionDate(Date.now()); //UTC Milliseconds

a.setExpirationDate(Date.now()+1000*60*60*24*30); //UTC Milliseconds, 30 days in the future.

a.setDecayFunction("t"); //Decays linearly with time. Could also be t^2 or sqrt(t)

a.setNegative(false); //This is an assertion that an individual *can* do something, not that they *cannot*.

a.setEvidence(["I saw them do it."]); //An array of evidence is required. Any string (URLs for instance) will do.

EcRepository.save(a,console.log,console.log);

Still throws the invalid evidence error

tombuskirk [7:20 PM]

Did anything display in the profile explorer after you did this?That evidence error won't stop anything from displaying in the profile explorer. The error: "Invalid evidence for demo:" just means that the evidence string isn't going to generate anything special for demos.The evidence parsing is still in development (cassproject/cass-profile#3). If you want to make the error go away you can insert a String like this into the assertion:"ProfDemo|Course|ADL Course|https://adlnet.gov/public/img/ADL_Logo_500px.png"The string format is:"ProfDemo|||<URL - html/jpg/pdf>"Example EvidenceTypes are: Degree, Course, Training, Badge, Seminar, Certification, CertificateSo for example you could do:

a.setEvidence(["ProfDemo|Course|ADL Course|https://adlnet.gov/public/img/ADL_Logo_500px.png"]); This is real conceptual stuff on our side. It will change in upcoming releases. Many of the debugging statements should have been disabled to remove potential confusion but the hope was they may help us solve other issues and there are ways to turn toggle them module by module once setup is complete.Again, evidence should not cause the profile explorer not to load. If you can insert an assertion with the VLRC and have it show up in the profile explorer but cannot do it manually then that will be the problem. Most of the test data used to develop the profile explorer was generated using blocks exactly like the ones you are trying.

@whistlinjoe
Copy link
Collaborator

Thanks for all the help!

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