I am getting it when I try to use content.publish,portal.loginUrl and portal.idProviderUrl. The same error might appear for some other functions, but I didn’t test all of them. Most of functions work correct.
The gradle.properties file uses the correct version(6.15.1) and I have also tried to change version manually by editing build.gradle file. I saw it downloading the correct version when building, so I assume the issue might be somewhere else.
Both libs are also included at a start of a file:
var portal = require('/lib/xp/portal');
var content = require('/lib/xp/content');
A quick guess: Your application is using a library that is including old versions of the portal and the content lib.
What are the libraries (+versions) your application is using?
compile "com.enonic.xp:core-api:${xpVersion}"
compile "com.enonic.xp:portal-api:${xpVersion}"
include "com.enonic.xp:lib-content:${xpVersion}"
include "com.enonic.xp:lib-portal:${xpVersion}"
include "com.enonic.xp:lib-thymeleaf:${xpVersion}"
include 'com.enonic.lib:util:1.1.1'
include "com.enonic.xp:lib-i18n:${xpVersion}"
include "com.enonic.lib:lib-http-client:1.0.0"
include 'com.enonic.lib:menu:1.2.0'
include "com.enonic.xp:lib-node:${xpVersion}"
include "com.enonic.xp:lib-context:${xpVersion}"
include 'com.enonic.xp:lib-mustache:6.1.0'
include "com.enonic.xp:lib-auth:${xpVersion}"
include "com.enonic.xp:lib-mail:${xpVersion}"
include "com.enonic.xp:lib-repo:${xpVersion}"