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 when trying to list entities #12

Closed
joaohelis opened this issue Oct 27, 2017 · 1 comment
Closed

Error when trying to list entities #12

joaohelis opened this issue Oct 27, 2017 · 1 comment
Assignees
Labels

Comments

@joaohelis
Copy link

joaohelis commented Oct 27, 2017

       <script type="text/javascript">
		$(document).ready(function() {
			console.log('Ready disparado');
			window.connection = new NGSI.Connection("http://ip_address:1026");

			console.log(connection);
			connection.v2.listEntities().then((result) => {
			    response.results.forEach((entity) => {
			        console.log(entity.id);
			    });
			});
		});
	</script>
Uncaught TypeError: this.makeRequest is not a function
    at NGSIConnection.makeJSONRequest2 (NGSI.js:206)
    at V2.listEntities (NGSI.js:2604)
    at HTMLDocument.<anonymous> (index.html:15)
    at j (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.I (jquery.min.js:2)
@aarranz aarranz added the bug label Nov 2, 2017
@aarranz aarranz self-assigned this Nov 2, 2017
aarranz added a commit that referenced this issue Nov 8, 2017
@aarranz
Copy link
Member

aarranz commented Nov 9, 2017

Sorry for not answering before. The exception raised by your code should be fixed by commit db122c2, but probably you will still have problems. I'm in the process to update the documentation, but as a summary, you will need to use orion context broker v1.10.0+ (not released yet, see telefonicaid/fiware-orion#501) or using some proxy to enable CORS, e.g. a cors-anywhere or pep proxy.

I will try to finish this documentation ASAP then I will make a release.

Best regards.

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

No branches or pull requests

2 participants